Click to See Complete Forum and Search --> : Popup Submit and Parent Redirect
thrustinj
04-28-2003, 03:44 PM
I've seen it done before, but I'm not a javascript master, so any advice would help.
I have a poll pop-up on a parent page. When the user submits the poll, I want the pop-up to close after the poll information is sent to the processing page and the parent page to redirect to the results page.
Any ideas?
thrustinj
04-28-2003, 03:46 PM
I've seen it done before, but I'm not a javascript master, so any advice would help.
I have a poll pop-up on a parent page. When the user submits the poll, I want the pop-up to close after the poll information is sent to the processing page and the parent page to redirect to the results page.
Any ideas?
havik
04-28-2003, 03:59 PM
I'm not sure how you coded your page but try something like this:
<form ... onsubmit="parent.location='results.htm'; window.close();">
change parent.location to reference your "parent frame"
Havik
Charles
04-28-2003, 04:37 PM
Havik, the onsubmit handler is called just before the form is submitted. If you close the window that contains the form just before the form is submitted, then the form never will get submitted.
thrustinj, How is your site going to work for the one in ten users that do not use JavaScript?
khalidali63
04-28-2003, 05:16 PM
Cross posting is not appreciated.Your question is already being answered by members in the other thread.
http://forums.webdeveloper.com/showthread.php?s=&threadid=8638
This thread should be merged with the one in HTML or Moved.
thrustinj
04-29-2003, 07:43 AM
Well the cross posting was an accident. When I registered I had already come in this forum, but after it moved me to the asp forum or html forum.
Notice that this thread has nothing to do with HTML or ASP??
Did anyone on that thread come up with an answer? I couldn't find it and the link was dead.
The threads were mearged. (see my last note)
Anyway, your best bet is going to be to use you poll script to redirect users to a different page after they submit the poll, and this page can then change tha parent page, and close itself.
thrustinj
04-29-2003, 08:40 AM
Thanks.