472,958 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

submit target iframe opening new window

I have a problem which is a slight twist on discussions I have seen previously here and elsewhere.

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
  1. function validate(selector) {
  2.  ...[snip-validation code]
  3.  document.selectProductForm.submit();
  4. }
  5.  
  6. <form id="selectProductForm" name='selectProductForm'  action="GetFields2.jsp" method="post"
  7.     target="queryFrame">
  8. <input type=hidden name="debug" value="<%= pageDebug %>" />
  9. Product Type:
  10. <select id="productTypeSelect" name="productType" onchange="validate(this)" >
  11. <option selected disabled="disabled" value='unchosen' id='unchosen'>Choose a product</option> <!-- empty -->
  12. ...[more options]
  13. ...[other cruft]
  14.  
  15.   <div class="tab-panes">  
  16.     <div class="content" id="queryPane">
  17.         <iframe name="queryFrame" id="queryFrame" src="blankQuery.html" 
  18.             height="100%" width="100%" >
  19.         If your browser supported iFrames, this would be the Query Pane.</br>
  20.         </iframe>
  21.     </div>
  22.     <div class="content" id="resultsPane">
  23.         <iframe name="resultsFrame" id="resultsFrame" src="blank.html" 
  24.             height="100%" width="100%">
  25.         If your browser supported iFrames, this would be the Results Pane.</br>
  26.         </iframe>
  27.     </div>
  28.   </div>
  29. </div>
  30.  
May 16 '07 #1
4 11985
I still don't know the answer to the multiple posts question, but if anyone cares, I used the iframe.location.replace method to update the iframe contents. Works much better.
May 16 '07 #2
iam_clint
1,208 Expert 1GB
not sure what would cause that problem
May 16 '07 #3
I still don't know the answer to the multiple posts question, but if anyone cares, I used the iframe.location.replace method to update the iframe contents. Works much better.

i read ur issue that you were haveing and I am having a issue somewhat like that. Im using C# in the backend and I want the iFrame src to change to what ever the textbox is i.e www.google.com or what ever in regards to websites. If you can helpme with that issue it would be great. thank you in advance
Oct 16 '07 #4
gits
5,390 Expert Mod 4TB
hi ...

post some html-and js-code regarding to your problem ... you have a textbox where a user may enter an url? and on click or enter or whatever the displayed page of an iframe should change to that url?

kind regards
Oct 17 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Atkinson | last post by:
Does anyone know how to replace <a href="url" target="_blank"> with window.open, keeping the window settings the same, i.e. same size, same toolbars, etc. I've tried document.open, and...
2
by: Daniele Baroncelli | last post by:
Hi guys, I am trying to find out how to position an opening window in Internet Explorer. While in Netscape/Mozilla/Firefox exist the options screenX and screenY for the open method of the...
3
by: mike | last post by:
I have a page and when the user clicks a button I want to open up a new window that has an iframe in it and I want to direct the page to submit to that iframe. My code looks like: var mywin;...
1
by: SP | last post by:
When I use a form with a target is as window.open? In particular in the new window can I use window.opener.location? In IE 5.2 and Safari 1.0 seems as window.opener is null Can someone give more...
4
by: MichaelK | last post by:
Hello. I have all data already collected on the current page? I want to open another window with the form, fill the fields and submit that form. So basically the question is how can I fill all...
4
by: sunil | last post by:
How do I find the length of page in target iframe? I am looking for the code or give me idea to find the length
1
by: deararuns | last post by:
i hav a window wit a button and text box.. Then am opening a new window... suppose if i type somethin in a first window's text box.. and click the button.. the value typed in the text box shoult...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.