Your problem is a JavaScript one, not php. Your variable - 'selvalue' is
only defined within the function.  Define it globally outside the function.
Trouble is it currently looks like the variable doesn't exist by the time
the function exits.  See if that works.

Mike


"Adi" <[EMAIL PROTECTED]> wrote in message
003001c242c7$d0df85b0$9600a8c0@adi">news:003001c242c7$d0df85b0$9600a8c0@adi...
hi:
i have 2 file: file1.php, file2.php
in file2.php i have:
....
echo "<form name='popupform' >
echo "<input type=text name=cod value='$cod'>&nbsp";
echo "Alege sistemul:  <input type=button name=choice value='alege'
onClick=window.open('file1.php','popuppage','width=450,
height=400,top=100,left=100,scrollbars=yes');><br>";
echo "</form>";
.....

in file1.php:
.....
<!-- Begin
function sendValue(s){
file://var selvalue = s.options[s.selectedIndex].value;
var selvalue = s;
window.opener.document.popupform.cod.value = selvalue;
window.close();
}
//  End -->
</script>
</HEAD>
<BODY>

<center>
<form name=selectform>
 echo "<input type='radio' value='1' name='selectmenu'>";
echo "<input type='radio' value='2' name='selectmenu'>";
echo "<input type='radio' value='3' name='selectmenu'>";
<input type=button value="select"
onClick="sendValue(this.form.selectmenu.value);">
</form>
......

Problem is with radio group value. I select an item in radiogroup box, and
when i click on select button, value passed to "cod" textbox is undefined.
How to make "cod.value" to take selected radio value?
tx in adv for any help
adi




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to