Forum Moderators: phranque
I want to do it so I can use the same process for several questions (different htm's for each Q). I don't need to retain any of the data or use any database stuff.
If anyone could help I'd be very grateful.
if you have a form on the main page called "theForm" and an element called "radio1" you can read the value in the popup as follows:
var myAnswer = document.opener.theForm.radio1.value;
You can also set the values of form elements the same way.
HTH
<h4>Credited Response: </h4>
<p>
<script language="JavaScript" type="text/javascript">
<!-- hide me
var answer
for (var i=0; i<opener.form1.rg1.length; i++)
{if (opener.form1.rg1[i].checked)
{answer = opener.form1.rg1[i].value}};
(answer == null)? document.writeln ("No answer ") : document.writeln ("While " + answer);
// show me -->
</script>
is a perfectly legitimate response, this question has no correct answer</p>