I have a form with an input select combo box whose target is an internal static iframe. The form can possibly be submitted several times as users change the selection in the combo box.
On first selection (and form submit) the resulting content is properly directed into the iframe.
However, on subsequent form submits, a new window is opened to display the content.
This happens in Firefox, Safari, and IE.
Any ideas?
I'm sure there is probably a better way to do this, but I'm somewhat new to this game, so I'm just trying things out.
Thanks,
Linus
(possibly?) relevant code bits:
Expand|Select|Wrap|Line Numbers
- function validate(selector) {
- ...[snip-validation code]
- document.selectProductForm.submit();
- }
- <form id="selectProductForm" name='selectProductForm' action="GetFields2.jsp" method="post"
- target="queryFrame">
- <input type=hidden name="debug" value="<%= pageDebug %>" />
- Product Type:
- <select id="productTypeSelect" name="productType" onchange="validate(this)" >
- <option selected disabled="disabled" value='unchosen' id='unchosen'>Choose a product</option> <!-- empty -->
- ...[more options]
- ...[other cruft]
- <div class="tab-panes">
- <div class="content" id="queryPane">
- <iframe name="queryFrame" id="queryFrame" src="blankQuery.html"
- height="100%" width="100%" >
- If your browser supported iFrames, this would be the Query Pane.</br>
- </iframe>
- </div>
- <div class="content" id="resultsPane">
- <iframe name="resultsFrame" id="resultsFrame" src="blank.html"
- height="100%" width="100%">
- If your browser supported iFrames, this would be the Results Pane.</br>
- </iframe>
- </div>
- </div>
- </div>