Click to See Complete Forum and Search --> : Making a Form response in a popup window


beachshooz
12-02-2003, 12:38 AM
I coded a "quiz" for my client that goes like this...if you select any checkbox besides the "none of the above", you go to page X. If you select "none of the above" you go to page Y. It all works ok but I would ultimately like for the X and Y pages to appear in a popup window so the user can close the popup and be back where he/she started. At this point, you have to hit the back button to get back to the original page.

I can't seem to blend the js I have with any popup scripts.

The page is http://www.harveygarcia.com/net_results/htmltester/story_net_fit.html

Thank you for any help you can offer. :confused:

batfink
12-02-2003, 07:56 AM
Where is the script that actions your two functions called in the body onLoad event? preloadImages(); MenusInitialize();

batfink
12-02-2003, 08:07 AM
Attached file opens selection in new window. You'll kick your self when you see how easy it was.:)

Tip: when declaring items enclose in quotes. i.e width="4"
Also I altered the valign from center to middle as center is not valid for the valign method.

beachshooz
12-02-2003, 01:27 PM
THANK YOU! I knew it had to be something really easy but for some reason, no matter how hard I tried, I just couldn't get it to do what I wanted. Perfect! THANKS! I can finally finish this website!:D

beachshooz
12-02-2003, 03:34 PM
You were so kind to solve my problem. Now when I add the window sizing code, it ignores it. I tried to add "scrollbars=no,width=800,height=500" to the code:

var new_url="";
function goTo ()
{
if ( (new_url != "") && (new_url != null) )
window.open("http://www.harveygarcia.com/net_results/htmltester/" + new_url, "scrollbars=no,width=800,height=500");
}

is that not correct?

Then my world would be perfect if I could add code to close the popup.

Let me know if you can help.

batfink
12-03-2003, 05:53 PM
Try this:

window.open("http://www.harveygarcia.com/net_results/htmltester/" + new_url,"", "scrollbars=no,width=800,height=500");

I added "", because there are three bits to the open() method so it was looking at your new code as the second bit which is the reference/window name of new page.
open("url","windowname","attributes")

beachshooz
12-03-2003, 06:09 PM
Verrrry nice.

Thanks again!

beachshooz
12-03-2003, 06:28 PM
Hey Batfink, since you are so good at this stuff. I wanted to let you know I posted a new thread in Javascript called: Side nav popup menu over flash. Here is the home page. If it is convenient for you, can you take a look at that thread? I didn't want to junk up this thread with another issue.

Thanks!