Variables in the Javascript DOM
Posted: Mon Dec 12, 2005 4:56 pm
Hi all
I would like to update a field on the web page based on a radio button checked. The radio button has the same id as an image, so if i select radio button with the id of 6 i would like to be able to get the src of img with the id of 6 and move it the the opener page
i've tried this:
which works perfectly
however when i try this:
i get a syntax error. (btw, i have a small function that loads the id of the checkbox into a variable called imgdat)
any ideas how to pass a variable into the DOM?
Thanks
I would like to update a field on the web page based on a radio button checked. The radio button has the same id as an image, so if i select radio button with the id of 6 i would like to be able to get the src of img with the id of 6 and move it the the opener page
i've tried this:
Code: Select all
opener.document.img1thumb.src = "test.jpg"however when i try this:
Code: Select all
opener.document.img1thumb.src = document.img + imgdat +.srcany ideas how to pass a variable into the DOM?
Thanks