shocker-z Posted September 16, 2006 Share Posted September 16, 2006 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?RegardsLiam Quote Link to comment https://forums.phpfreaks.com/topic/20969-the-dom-object/ Share on other sites More sharing options...
Daniel0 Posted September 16, 2006 Share Posted September 16, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/20969-the-dom-object/#findComment-93041 Share on other sites More sharing options...
fenway Posted September 20, 2006 Share Posted September 20, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/20969-the-dom-object/#findComment-95270 Share on other sites More sharing options...
shocker-z Posted September 21, 2006 Author Share Posted September 21, 2006 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.. Quote Link to comment https://forums.phpfreaks.com/topic/20969-the-dom-object/#findComment-96244 Share on other sites More sharing options...
obsidian Posted September 21, 2006 Share Posted September 21, 2006 maybe if you showed us some example code and reference where it's not working, we'd be of more help Quote Link to comment https://forums.phpfreaks.com/topic/20969-the-dom-object/#findComment-96249 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.