dcsimg
JSP and javascript
5 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   joe_vosilla
Posted On:   Tuesday, September 17, 2002 01:43 PM

Hello, I have an JSP page where i am adding a few text field using a loop to iterated thru to create field ( same name) <% for(int i = 0 ;i < 5; i++) { %> width="45%" height="36"> class="styleinput"> How do i get the individual values of the field to do some validating using javascript . thanks in advance for any help?    More>>

Hello,


I have an JSP page where i am adding a few text field

using a loop to iterated thru to create field ( same name)


<%


for(int i = 0 ;i < 5; i++)
{
%>


width="45%" height="36">




class="styleinput">



How do i get the individual values of the field to do some validating using javascript .



thanks in advance for any help?

   <<Less

Re: JSP and javascript

Posted By:   Firat_Tiryaki  
Posted On:   Friday, September 20, 2002 07:55 AM

and also you can print out a javascript array in a loop with JSP and compare them with this array's values.

Re: JSP and javascript

Posted By:   Firat_Tiryaki  
Posted On:   Friday, September 20, 2002 07:53 AM

you can print out hidden fields too. and compare them with those hidden fields.

Re: JSP and javascript

Posted By:   Nitesh_Naveen  
Posted On:   Wednesday, September 18, 2002 01:48 AM

You could've saved your time if you had searched the forum. See an already existing thread on a similar question... (Click here) - the 2nd last answer

Re: JSP and javascript

Posted By:   Jeanne_Boyarsky  
Posted On:   Tuesday, September 17, 2002 04:30 PM

Alternatively, you can use an array to access them.

Re: JSP and javascript

Posted By:   rajeev_kumar  
Posted On:   Tuesday, September 17, 2002 02:32 PM

Hi,


Instead of creating the text fields with same name do the following




This will created PLATFORM0,PLATFORM1...PLATFORM5 and then you can access the values of the individual textfields for the javascript validation
About | Sitemap | Contact