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.


"Adi" <[EMAIL PROTECTED]> wrote in message
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''file1.php','popuppage','width=450,
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;
//  End -->

<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"

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

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to