Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 26th, 2004, 12:54 PM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Arrays using JavaScript,/JSP Iterator in IE celticbhoy Javascript How-To 3 December 11th, 2007 10:55 AM
Help: Arrays using JavaScript,/XML in IE celticbhoy Ajax 0 December 10th, 2007 01:15 PM
error accessing database connection using jsp muthumari_p2003@yahoo.com Pro JSP 0 May 8th, 2006 05:54 AM
Comparing arrays in javascript JohnD Javascript How-To 0 August 29th, 2004 02:32 PM
Accessing of Arrays of jsp in javascript theguardian@vsnl.net JSP Basics 1 August 26th, 2004 11:16 PM



All times are GMT -4. The time now is 04:05 PM.


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