guess that should be:

alert(document.babai.bongu.selectedIndex);

Greets,

Edward

----- Original Message -----
From: "Balaji Ankem" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 11:23 AM
Subject: [PHP] Hi problem with selected value!!


> Hi friend,
>   could u plz. Tell me how to display the slected option value in alert
> box?
>
> Code I wrote is like this.. But I am getting NULL.. Any help would be
> appreciable..
>
> =====================================
> <html>
>
>
> <head>
>
>
> <script language="Javascript">
>
> function check()
> {
>         var a;
>         alert(document.babai.bongu.value); // Is it correct??
>         return true;
> }
>
> </script>
>
>
> </head>
>
>
> <body>
> <form name="babai">
>
> <select name="bongu">
>         <option value="11">11</optiuon>
>         <option value="12">12</optiuon>
>         <option value="13">13</optiuon>
>
> </select>
> <input type="submit" value="check" onclick="check();">
> </form>
> </body>
> </html>
> ============================================
>
> Thanks in advance
> Balaji
>
>


----------------------------------------------------------------------------
----


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



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

Reply via email to