View Single Post
  #3 (permalink)  
Old 04-27-2008, 05:55 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 5,030
Last Blog:
Web slideshow in JavaS...
Rep Power: 43
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: new to javascript, help with reducing redundancy

That's certainly possible. Use the eval() function:

Code:
eval('object.style.' + direction + ' = 1px');
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Web Site | Beta Site
Reply With Quote