I have a contact form in an iFrame on my site. When someone clicks submit the iframe is supposed to load either the success page or the error page. When I first made it it worked fine, but now when ever I hit submit the page opens in a new window.

http://www.scoobasteve.org is my site, and the contact form is at the end.

My code that directs to either of the pages is:

if ($success){ include ('ok.html'); } else{ include ('error.html'); }

So my question is, How do I make include() open in the iFrame and not in a new window?

2 answers

This was chosen as the best answer

I think it's the target="contactForm" in the form tag of the form. This probably thinks that it should open a new window as I don't think that target references an iframe, but instead a window name.

Answered almost 8 years ago by Darryl Hein
  • Oh yeah, thanks, I forgot I had changed the id of the iFrame and never updated it as the target. Stephen Cronin almost 8 years ago
sankar 0

it may be work target="_self"....

Answered almost 8 years ago by sankar