Results 1 to 3 of 3
  1. #1
    prabhurangan is offline Member
    Join Date
    May 2008
    Posts
    69
    Rep Power
    0

    Question [SOLVED] Struts 2 <s:select> tag value ..... ?

    Hi Members,
    Im using <s:select> tag and on selecting the value from the list, im making a onchange event, in this im calling a javascript function and i have to retrieve the selected list value in javascript.

    Not only in select tag, on using any tags, in <s:textfield> also i have to get the textfield value in the javascript function.

    Please anyone help me out in this.

    Looking forward for your reply.

    Regards,
    Prabhu.

  2. #2
    prabhurangan is offline Member
    Join Date
    May 2008
    Posts
    69
    Rep Power
    0

    Default

    <s:select label="Dut Name" headerKey="1" headerValue="-- Please Select --" onchange="javascript:show_user_details(this.value) ;return false;" list="userList" listValue="xxx" />
    How to get the listValue passed to javascript function, if i use (this.value) im just getting arraylist object there, but im not getting the value.
    Please anyone help me out in this.

    Looking forward for your reply.

    Regards,
    Prabhu.

  3. #3
    prabhurangan is offline Member
    Join Date
    May 2008
    Posts
    69
    Rep Power
    0

    Default

    <s:a href="#" onclick="javascript:show_user_details('%{id}');ret urn false;"><s:property value="id" /></s:a>
    But this is working if we use <s:property> tag, and retrieve the value from javascript. Please anyone help me for my last post.

Similar Threads

  1. Select Count
    By Apple2 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 04-29-2008, 09:02 AM
  2. Using a variable in a SELECT FROM WHERE query
    By cplmckenzie in forum JDBC
    Replies: 12
    Last Post: 04-23-2008, 03:24 AM
  3. JDBC select problem
    By abhiN in forum JDBC
    Replies: 0
    Last Post: 03-12-2008, 08:09 AM
  4. Select specific cell
    By Echilon in forum New To Java
    Replies: 1
    Last Post: 01-01-2008, 07:47 AM
  5. How to select/highlight an entire row in JTextArea
    By Valeriano in forum AWT / Swing
    Replies: 2
    Last Post: 05-28-2007, 11:20 AM

Posting Permissions

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