473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 11996
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.