JS problem

From: Date: Mon, 06 Nov 2000 20:46:17 +0000
Subject: JS problem
Groups: php.db 
Request: Send a blank email to php-db+get-4258@lists.php.net to get a copy of this message
Hello: I have a piece of JS that takes the result from a query (value of a user selected radio button) and puts the value back on the parent form...This is working fine, except when there is only one radio button!! I have tried changing the values, but I can't get it to work. What am I doing wrong? function updateParent() { radio=document.gle.gle_selection; for (i = 0; i < radio.length; ++ i) { //loops number of times per radio buttons if (radio[i].checked) { for (j = 1; j < 7; ++ j) { var writeit = eval("opener.document.correl.gle"+j); if (writeit.value != "") { //the parent textbox is not empty } else { writeit.value=radio[i].value; break; }//endif }//endfor } } } Thanks Luis __________________________________________________ Do You Yahoo!? Thousands of Stores. Millions of Products. All in one Place. http://shopping.yahoo.com/

« previous php.db (#4258) next »