Hey,
To return the information you can alway use opener. opener refers to the
parent document that opened the window. Something like:
if (opener && !opener.closed && opener.returnedValues) {
opener.returnedValues(id, location);
}
returnedValues is a function you have to write in the master form.
Now there are several ways to solve the other problem. You could build
an additional array, or you could make multiple hidden fields, but I
would think the following would be the easiest. You could integrate the
values in the radiobutton. For example, you could do the following:
<INPUT TYPE="radio" NAME="list" VALUE="1,0"> ID 1, Location 0
<INPUT TYPE="radio" NAME="list" VALUE="2,1"> ID 2, Location 1
<INPUT TYPE="radio" NAME="list" VALUE="3,2"> ID 3, Location 2
Now once you press 'the' button you can do the following
function sendBackValues()
{
list = document.myform.list;
for (i=0;list.length;i++)
{
if (list[i].checked) {
if (opener && !opener.closed && opener.returnedValues)
{
values = list[i].value.split(',');
opener.returnedValues(values[0], values[1]);
return;
}
}
}
alert('No options checked!');
}
Good luck,
Vincent
cwwilly wrote:
Hello,
Thanks for taking a look at this!
Problem:
I'm trying to pass multiple dynamic values between a slaveform and a
masterform. The problem I'm having is on the slaveform I loop through
multiple records and want two values depending on the row they select.
slaveform: x=selected
Radio ID Location
x 1 1
2 2
3 3
.
.
.
So in the slaveform I want the ID=1 and Location=1 passed back to the
masterform. Since the row has been selected by selecting the radio
button. I'm using ASP to loop through the records of the database if
this makes any difference.
I would really appreciate an example or suggestions if you guys have
any.
Thanks !