Link to home
Start Free TrialLog in
Avatar of jmelonis
jmelonis

asked on

Referencing a division

I need to set a division to hidden when a certain event happens.  I pass x to determine what division should be hidden.  So basically I need to know how I can 'run' this string.  

   //x is an integer
   temp2="division"+x+".style.visibility = hidden";
   eval(temp2);

Or is it possible to reference the division by
   document.div[x].style.visibliity = "hidden"
????
             
ASKER CERTIFIED SOLUTION
Avatar of bebonham
bebonham

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jmelonis
jmelonis

ASKER

All I had to do was put hidden in single quotes.  But bebonham you tried hard.  Way to go you just got 101 points.  compton's in the house.