Results 1 to 2 of 2
  1. #1
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default HTMLMultibox manipulation in JavaScript (Struts)

    I have a multibox in one of my JSP's that I want to manipulate via JavaScript, and have one of the
    checkboxes selected.

    The multibox property is "allChoices"

    in JavaScript, how do I reference the first checkbox in the multibox?

    The code I have now does not seem to be working:


    Java Code:
    var choice1 = document.getElementById("allChoices[0]");
    
    choice1.checked = true;

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,802
    Rep Power
    19

    Default

    You'd do better at a Javascript forum, since this is a Javascript question really.

Similar Threads

  1. struts html tags vs javascript
    By murali in forum Web Frameworks
    Replies: 0
    Last Post: 12-01-2008, 02:18 PM
  2. Image manipulation.
    By ambikark in forum Advanced Java
    Replies: 0
    Last Post: 10-15-2008, 01:37 PM
  3. Replies: 0
    Last Post: 08-13-2008, 11:38 AM
  4. Array manipulation
    By Ms.Ranjan in forum New To Java
    Replies: 9
    Last Post: 07-18-2008, 09:10 PM
  5. Is it possible to use struts-html tags in javascript...?
    By prabhurangan in forum Web Frameworks
    Replies: 0
    Last Post: 05-27-2008, 02:11 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
  •