www.webdeveloper.com
Results 1 to 2 of 2

Thread: multiple getElementById

  1. #1
    Join Date
    Nov 2006
    Posts
    198

    multiple getElementById

    Hey there,

    I'm trying to have the action in this script affect multiple elements besides the 'popup' div. I tried to use it in combination with getElementsByTagName but that didn't seem to work. How can I affect more than one element while using getElementById?

    Code:
    function showDiv (popup) {
    	
    var elem = document.getElementById('popup');
    elem.style.position = 'absolute' ;
    elem.style.left = '22px' ;
    var truck = document.getElementById ('homecontentleft');
    truck.style.visibility = 'hidden';
    return ( true ) //everythings ok
    }
    thanks in advance

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,443
    Let us see the rest of the code that you are using that does not work.

    Indicate which multiple elements you want effected and how.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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



Recent Articles