JSP : Problem with textbox having same name..


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: JSP : Problem with textbox having same name..

  1. #1
    Join Date
    Sep 2006
    Posts
    6

    JSP : Problem with textbox having same name..

    Hi..

    Im having doubt in jsp & its urgent need for me..help out...

    Im having multiple html textbox of same name. Onclicking that textbox
    i have to call one JS page that creates calendar window which returns date
    to same textbox after selection.

    For single textbox, the values returns corretly..for multiple it doesnt return
    the value..coz of same name i think..

    Code:

    <script language="JavaScript" src="CmJavaScript.JS" ></script>

    <td class="table-text-tab"><input type=text name=a_date onClick=javascript:showcal('testForm.this.value'); value=<%=rs0.getString(5)%> size=13>
    <td class="table-text-tab"><input type=text name=f_date onClick=javascript:showcal('testForm.this.value'); value=<%=rs0.getString(7)%> size=13>



    Here showcal is the functionname & testform is the form name.

    Waiting eagerly for reply..thanx in advance...

  2. #2
    Join Date
    Sep 2006
    Location
    hyderabad
    Posts
    5

    tell perfectly

    <script language="JavaScript" src="CmJavaScript.JS" ></script>

    <td class="table-text-tab"><input type=text name=a_date onClick=javascript:showcal('testForm.this.value'); value=<%=rs0.getString(5)%> size=13>
    <td class="table-text-tab"><input type=text name=f_date onClick=javascript:showcal('testForm.this.value'); value=<%=rs0.getString(7)%> size=13>

    in above code where are u using same name

  3. #3
    Join Date
    Sep 2006
    Posts
    6

    Talking hi..

    here this two table data will be looped till the end of record selection.
    for example if i select 2 records in previous page..this code will be executed twice & will display textbox twice with same name..

    ie

    a_date ------------ f_date -----------
    a_date ------------ f_date -----------
    -thiyagarajan palanisamy

  4. #4
    Join Date
    Sep 2006
    Posts
    6

    continued..

    if i click first a_date textbox it populates calendar thru JS which returns date.

    bcoz of same textbox name..it doesnt returns the value...

    i mean its confused where to return whether in 1st (r) 2nd textbox?
    Last edited by thiyagu; 09-07-2006 at 07:20 AM.
    -thiyagarajan palanisamy

Similar Threads

  1. Replies: 0
    Last Post: 07-01-2006, 02:45 AM
  2. How to reload a jsp not from cache
    By benshams in forum Web
    Replies: 0
    Last Post: 06-29-2006, 04:19 PM
  3. TextBox and language problem
    By Kotb in forum VB Classic
    Replies: 0
    Last Post: 10-24-2001, 12:53 AM
  4. How to invoke C DLLs from a JSP
    By Mohan in forum Java
    Replies: 6
    Last Post: 03-02-2001, 02:42 PM
  5. JSP and the <SERVLET> tag
    By Dusty in forum Java
    Replies: 2
    Last Post: 04-07-2000, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center