Find a control with javascript
I want to change the value of an <a> that I have embedded in a content block with javascript.
Here is the tag
<a href="#" name="bgController" onclick="defaultImage()">Turn background off</a>
My javascript does not find the control - is this because the control is in a content block?
Thanks
Ron
Here is the javascript
function defaultImage() var theLink = document.getElementById("bgController"); if (theLink.value == 'Turn background off') document.body.className = "defaultBG"; theLink.value = 'Turn background on'; else document.body.className = "schoolBG"; theLink.value = 'Turn background off'; Hi Ron,
I answered you question in the other forum thread.
Greetings,Thanks!!
I couldn't find my original post - sorry for the double post
Thanks again for all the help
Ron