Jump to content

Archived

This topic is now archived and is closed to further replies.

shocker-z

The DOM Object

Recommended Posts

I'm doin AJAX and was advised this to get 2 functions to work off 1 click to change 2 div tags at once..

"You can use The DOM Object To get the Div Tag You need and set the needed attributes in the Div Tag on the ONCLICK Event , both Can Divtags be set in a single method."

Was wondering if anyone had examples of this?

Regards
Liam

Share this post


Link to post
Share on other sites
I'm not sure what is meant, but could it be something like this:

[code]< script type='text/javascript'>
document.getelementbyid('something').onclick = function(var1,var2)
{
// bla bla
}
</script>

<div id='something'>bla bla bla bla</div>[/code]

Share this post


Link to post
Share on other sites
You can look up as many DOM elements as you need in any given function, so I'm not sure what you're referring to.

Share this post


Link to post
Share on other sites
I'm basicaly playing with AJAX and i need 2 DIVs to change when i click a link but wont work by me putting 2 functions inside a funtion for some reason..

Share this post


Link to post
Share on other sites
maybe if you showed us some example code and reference where it's not working, we'd be of more help

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.