How do i close the iframe using javascript.I found some method to do that using
window.parent.close();
but this method close the whole tab.But what I need is only close the iframe.Any one got a solution for that??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An iframe isn’t a window, it can’t be closed. You may hide it using
or remove it if you won’t use it again :
If you want to hide or remove the iframe from a script inside the iframe document, you must get the relevant element first. You can do this :
If you don’t do this from the iframe, you should have some kind of reference. Or you may do it indiscriminately as