Feb 04, 2011, 8:03 PM
[CLOSED] Moving javascript into a separate .js file
Hello,
I'd like to move some javascript off my page into a standalone Javascript file, which means moving it outside of a <ext:XScript runat="server" > tag. I have a control #{mySlider} that resolves at runtime to: ContentTH_uc999_mySlider and is of type Object. If I look at
Thanks,
Eric
I'd like to move some javascript off my page into a standalone Javascript file, which means moving it outside of a <ext:XScript runat="server" > tag. I have a control #{mySlider} that resolves at runtime to: ContentTH_uc999_mySlider and is of type Object. If I look at
ContentTH_uc999_mySlider.id
is see that it's value is "ContentTH_uc999_mySlider." However, if I look at document.getElementById(ContentTH_uc999_mySlider.id)
, it is an HTMLInputelement. document.getElementById(ContentTH_uc999_mySlider.id) == ContentTH_uc999_mySlider
is false. Why aren't these equivalent?eval(ContentTH_uc999_mySlider.id)
is of Type Object. eval(ContentTH_uc999_mySlider.id)===ContentTH_uc999_mySlider
evaluates to true. Any suggestions for a way to get to the object other than using eval?Thanks,
Eric
Last edited by Daniil; Feb 08, 2011 at 2:05 PM.
Reason: [CLOSED]