php and javascript
| From: | PartyPosters | Date: | Sun, 10 Apr 2005 20:44:36 +0000 |
| Subject: | php and javascript | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212766@lists.php.net to get a copy of this message | ||
Hello, I have a form that when I hit sumbit I want to test the varialble in javascript. I can get it
working using test variables in php but I want to be able to call the input box in my form, the only
problem is the name of the box is in an array (i think) as it's in a list. You can see the 2
samples of the code below which will hopefully make more sence.
Can anyone help me out?
Thanks.
<head>
<SCRIPT language=JavaScript>
function checkdata() {
alert(document.Selection.quantity[0].value)
alert("TEST")
return true
}
</SCRIPT>
</head>
---------------------------------------------------------------
while ($row=mysql_fetch_array($mysql_result))
{
echo "<TR>
<INPUT NAME = \"distID[]\" TYPE = \"HIDDEN\" VALUE=\"$distID\">
</TR>";
}