When this form's being submitted, two windows are opening instead of only
one
here is the function I'm using:
function subForm(){
//insert form validation here
//if form is valid, open a pop-window & submit
subWin =
window.open("http://www.smoochya.com/books.html","subWin","width=550,height=
350,address=no")
document.SendScore.action = "tellafriend_quiz1.php"
document.SendScore.method = "post"
document.SendScore.target = subWin
document.SendScore.submit()
}
here is the form in the HTML body:
<FORM NAME="SendScore" >
<INPUT TYPE="hidden" name="numbercorrect" value="">
<INPUT TYPE="IMAGE" onClick="subForm()" SRC="/images/passitalong_quiz.jpg"
</FORM>
the only other thing going on which probably is not interfering is the fact
that I'm making that "hidden" variable switch to a javascript variable from
being submitted by another form page that comes before this one.
I'm calling it in the BODY tag using onLoad="javascript:
SwitchNumberRight();" which calls this function:
function SwitchNumberRight(){
document.SendScore.numbercorrect.value = numberright;
}
anyway the code can be viewed by going to http://www.smoochya.com/quiz1.html
and picking some answers (or not picking any) on the quiz. You'll notice
that one of the windows gives you your score while the other one (without
any toolbars) doesn't. Can't seem to get it to open only one window with the
score included.
Any help greatly appreciated..
Thanks,
M