p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   JSP Basics (http://p2p.wrox.com/forumdisplay.php?f=92)
-   -   Accessing of Arrays of jsp in javascript (http://p2p.wrox.com/showthread.php?t=17480)

theguardian@vsnl.net August 26th, 2004 12:54 PM

Accessing of Arrays of jsp in javascript
 
Hello Sir / Madam,
     How to acess the value of array in javascript function. consider the following example

<script language = javascript>
function check_max()
{
   var i = 0;
   for (i = 0; i< parseInt(document.form[0].hid_cnt.value); i++)
   {
     alert(document.forms[0].cmb_max[i].value);
   }
}
</script>
<body>
<%
// consider rs to be a recordset
    int cnt = 0;
    while (rs.next())
    {
%>
           <select name = cmb_max[<%=cnt%>]>
           <option value = 2>
                    2
           </option>
           </select>
<%
    }
%>
<input type = button value = "Calculate" onclick=check_max()>
</body>
on clicking of calculate the value 2 should be poped up which is not done. so kindly rectify my problem as soon as possible.
kindly mail me on theguardian@vsnl.net





All times are GMT -4. The time now is 04:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.