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 Coder
    Join Date
    May 2004
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can I array all select boxes?

    This is what I'm trying, and I'm getting nothing out of it:

    Code:
    var allSelectBoxes = document.getElementsByTagName('<select>');
    	for (i=0;i<allSelectBoxes.length;i++) {
    		alert(allSelectBoxes[i]);
    	}
    Last edited by questor; 07-03-2006 at 04:35 PM.

  • #2
    New Coder
    Join Date
    May 2004
    Posts
    73
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Fixed.

    Code:
    var allSelectBoxes = document.getElementsByTagName('select');
    	for (i=0;i<allSelectBoxes.length;i++) {
    		alert(allSelectBoxes[i]);
    	}


  •  

    Posting Permissions

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