Thread
:
new to javascript, help with reducing redundancy
View Single Post
#
3
(
permalink
)
04-27-2008, 05:55 AM
Xav
Join Date: Mar 2008
Location: London, England
Posts: 5,030
Last Blog:
Web slideshow in JavaS...
Rep Power:
43
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
Xav
View Public Profile
Send a private message to Xav
Visit Xav's homepage!
Find all posts by Xav