Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jquery to traverse through the grid of text boxes

    [Hi All,
    iam new to jquery .i have scrip;et code in the JSP which generates grid of text boxes on a dialog and on click of savebutton i have written logic for the saveDialog .i need to capture id of the text boxes in the Java script
    this is the scrip;et in jsp

    <div style="border-style:solid;border-width:1px;" class="preferredAirline">

    <% Vector<String> labelList = new Vector<String>();

    labelList.add("P11");
    labelList.add("P21");

    ListIterator<String> labelListIterator = labelList.listIterator();

    while(labelListIterator.hasNext())
    {
    String lableName = labelListIterator.next();
    %>
    <s:text name="<%= lableName %>" size="2" onkeyup="if(this.value.length > 2){ this.value = this.value.substr(0,2); return false;}"
    onblur="this.value = this.value.toUpperCase();"
    id="<%= lableName %>"/>




    <%} %>


    <br/>


    <div style="float: right;">
    <s:button name="save" value="Save" id="saveDialog"/>


    </div>

    And how do we get the values of the text boxes populated on to the anothe jsp we need to write a java script function

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    um, yeah. Post the generated HTML.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •