views:

2032

answers:

2

I'm editing some existing html where the javascript loads a another page inside an iframe. In the page is an html form. When I hit submit, I'd like for the outer page to stay and the iframe to change to the results page. However, right now the whole page changes to the results page for the form. I'm guessing there's a way to solve this javascript. Any suggestions?

A: 

Try using the target attribute of the form tag. You can specify the frame.

GiDo
+4  A: 

Target the form to the iframe:

<iframe name="foo"></iframe>

<form target="foo"></form>
Greg