View Full Version : Process and Popup on Input Button?
10-20-2003, 12:55 AM
I've been playing with this script for a bit now, it's for a quiz I am making, I got each code to work fine on thier own.. so it's no problems with that. I just want the results of the Quiz to pop-up in a popup window. To do this I have to have process and popup assigned to the same input button.
I got this code to make a popup window and process.. but it processes in the same window.. and it makes a blank popup appear. c_c;
Here is the code, maybe someone here can help me? ^^;
<input type="button" Value="Submit!" onclick="window.open('yoururlhere.html', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=y es,width=500,height=500');process();">
10-20-2003, 01:19 AM
If I understand correctly this should work. If you want the process() to happen IN the new window on the other hand. That is different.
<input type="button" value="GO!" onclick="newWin('http://www.codingforums.com');process();new_win.focus();">
10-20-2003, 01:26 AM
Thanks for the help, but that isn't what I wanted. 0o; the "process();" is supposed to give the results of the quiz, and I wanted the results of the quiz to appear in a popup window like the one I had defined. ^^;
10-20-2003, 01:42 AM
Kinda hard to tell without some code but this might get you started.
var str="Test Results"
<input type="button" value="GO!" onclick="newWin();new_win.focus();">
10-20-2003, 02:27 AM
;__; that code doesn't even work.. geh. Okay.
That is the page I am having the problems with. I'd like to have the quiz results open in that page ( they aren't done yet, but I'd know if it worked ). But the code I have opens a popup, but it also makes the quiz results open in the parent window. Yeah.
10-20-2003, 02:40 AM
location.href = out + ".php";
Change that location.href line to:
var w = window.open(out + ".php", "result","width=500,height=500");
then the button:
<input type="button" Value="Submit!" onclick="process()">
10-20-2003, 02:49 AM
^__^ Thank you very much! That is exactly what I wanted! It works great now! :D
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.