cbowden
11-18-2003, 04:07 PM
I'm trying to create a quiz with a bunch of radio buttons. When the user presses the submit button i wanted it to open a window showing the answers the person chose as well as whether or not they got the right answer. So i generated the following code:
function DisplaySumm()
{
SummWin = window.open('','NewWin', 'Toolbar=no,status=no,width=300,heigth=500')
Message = "<center><h3>Quiz Results</h3></center><ul>"
+ "<li><i>Name: </i><b>" +
document.frmSites.realname.value + "</b>" ;
+ "<li><i>Email: </i><b>" + document.frmSites.email.value + "</b>" ;
+ "<li><i>Question 1: </i><b>" + document.frmSites.Q1Q1.value + "</b>" ;
+ "<li><i>Question 2: </i><b>" + document.frmSites.Q1Q2.value + "</b>" ;
SummWin.document.write(Message) ;
}
Along with the onclick function to set to open this function. When i try it it can read the email and name fields but none of the radio button values. I can't figure out why. Please help.
function DisplaySumm()
{
SummWin = window.open('','NewWin', 'Toolbar=no,status=no,width=300,heigth=500')
Message = "<center><h3>Quiz Results</h3></center><ul>"
+ "<li><i>Name: </i><b>" +
document.frmSites.realname.value + "</b>" ;
+ "<li><i>Email: </i><b>" + document.frmSites.email.value + "</b>" ;
+ "<li><i>Question 1: </i><b>" + document.frmSites.Q1Q1.value + "</b>" ;
+ "<li><i>Question 2: </i><b>" + document.frmSites.Q1Q2.value + "</b>" ;
SummWin.document.write(Message) ;
}
Along with the onclick function to set to open this function. When i try it it can read the email and name fields but none of the radio button values. I can't figure out why. Please help.