I have a web page that pops up a new window with a form in it, then when the
user clicks the submit button in the new window, it submits to the
originating window and the new window closes.
This works fine in IE 6, but fails in Netscape 7.
The code for opening the new window is:
win2 = window.open('advanced.html', '',
'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=4
00,height=430,left = 312,top = 159');
win2.opener.name = "opener";
The code in the new window for submitting the form is:
<form name="form1" method="post"
action="http://www.mywebsite.com/cgi-bin/search.pl" target="opener"
onsubmit="window.close()">
In Netscape, the new window closes, but the form is not submitted to the
original window.
Any suggestions on making this work in Netscape would be greatly
appreciated.
Thank You,
Corey Martin 3 1337
news.comcast.giganews.com wrote: I have a web page that pops up a new window with a form in it, then when the user clicks the submit button in the new window, it submits to the originating window and the new window closes.
This works fine in IE 6, but fails in Netscape 7.
The code for opening the new window is: win2 = window.open('advanced.html', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=4 00,height=430,left = 312,top = 159'); win2.opener.name = "opener";
win2.document.forms[0].target=opener; The code in the new window for submitting the form is:
I would eliminate "window.close()"
<form name="form1" method="post"
action="http://www.mywebsite.com/cgi-bin/search.pl">
You could add target="javascript:opener"
Mick In Netscape, the new window closes, but the form is not submitted to the original window.
Any suggestions on making this work in Netscape would be greatly appreciated.
Thank You, Corey Martin
news.comcast.giganews.com said: I have a web page that pops up a new window with a form in it, then when the user clicks the submit button in the new window, it submits to the originating window and the new window closes.
This works fine in IE 6, but fails in Netscape 7.
The code for opening the new window is: win2 = window.open('advanced.html', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,me nubar=0,resizable=1,width=4 00,height=430,left = 312,top = 159'); win2.opener.name = "opener";
The code in the new window for submitting the form is: <form name="form1" method="post" action="http://www.mywebsite.com/cgi-bin/search.pl" target="opener" onsubmit="window.close()">
In Netscape, the new window closes, but the form is not submitted to the original window.
Any suggestions on making this work in Netscape would be greatly appreciated.
It works in Netscape if you eliminate the onsubmit handler.
Just as it should, the onsubmit handler executes *before*
the form is submitted. The window closes immediately with
nothing submitted.
"news.comcast.giganews.com" <an**@ymous.com> writes: I have a web page that pops up a new window with a form in it, then when the user clicks the submit button in the new window, it submits to the originating window and the new window closes.
Ok, makes sense.
This works fine in IE 6, but fails in Netscape 7.
The code for opening the new window is: win2 = window.open('advanced.html', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=4 00,height=430,left = 312,top = 159');
Avoid posting lines longer than ~72 characters. Your client broke the
above line. In this case it is obvious, but in other cases it can introduce
more subtle errors.
Remove spaces in third argument to window.open. Some browsers choke on
them (not Netscape 7 though, so that's not the problem).
It's not necessary to have the propertie with "=0" in the third argument.
The default is "off" if they are not present, so only put in the ones with
"=1".
Should "win2" be a global variable, or have you declared it local in some
other part of the code?
win2.opener.name = "opener";
That should be the same as
window.name = "opener";
That's also safer
The code in the new window for submitting the form is: <form name="form1" method="post" action="http://www.mywebsite.com/cgi-bin/search.pl" target="opener" onsubmit="window.close()">
The onsubmit handler is executed *before* the form is submitted. I am
amazed that it works in IE.
In Netscape, the new window closes, but the form is not submitted to the original window.
That was what I would expect.
Any suggestions on making this work in Netscape would be greatly appreciated.
Try delaying the window closing, e.g.,
onsubmit="setTimeout(window.close, 500);"
(or perhaps a little safer:
onsubmit="setTimeout(function(){window.close();}, 500);"
)
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.' This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: rez |
last post by:
I find it rather frustrating that Netscape 4.x is "no longer
supported:"
http://help.netscape.com/products/client/communicator/reflib.html
Same seems true with IE.
How am I ever supposed to...
|
by: Catherine Lynn Smith |
last post by:
OK, I know this issue has been beat to death, but I have tested my
script in Netscape 7.1 and it does seem to be getting the calculated
values it needs to create placement coordinates, and every...
|
by: hannibal |
last post by:
Hi
i have a netscape and IE incompatibility problem.
when i change the text size in netscape everything looks fine and all frames
text size change .
but when i change the text size in IE just...
|
by: Vincent van Beveren |
last post by:
Hey everyone,
I have trouble capturing events in Netscape 7.1.
I am building a WYSIWYG editor thingy which should both work in IE and
NS 7. For this I use designMode='on'. However, it seems...
|
by: Ike |
last post by:
Anyone have any idea why the following would work on Netscape 7.x but not
MSIE ? Thanks, Ike
<input type=button onClick="recalc()" value="Recalc Form">
..
..
..
<SCRIPT...
|
by: m0002a |
last post by:
I have sucessfully set up an HADR pair of databases. Everthing works
fine for the primary and secondary HADR databases, and manual takeover
works fine.
When I try to set up the second pair of...
|
by: Joshua Moore |
last post by:
I have a webservice that serializes a ton of variables and other good stuff
to a txt file using SoapFormatter (IFormatter), and when I try to
deserialize it using the binary formatter, i get the...
|
by: Doug Lind |
last post by:
Hi all,
I have seen a number of posts re: the BinaryFormatter version
incompatibility but nothing on how to recover from it. In my case, I want
the exception to trigger an alternate behaviour...
|
by: GG |
last post by:
Does anybody know the msdn website that shows the incompatibility
between vs2005 and vs2003?
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |