Page 1 of 1

how to get the id of div tag on body onload event

Posted: Thu Mar 12, 2009 11:50 am
by mona02
I m using an iframe and my pages are loaded on iframe and i m using ajax for that now for e.g i have one user registration page and on this page one other page is displaying on onclick event now i want to get the id of div tag situated on this third page and on onload event cananybody tell me how to get that id
i m document.getElementById but it is comin null on onload event


thanks in advance

Re: how to get the id of div tag on body onload event

Posted: Thu Mar 19, 2009 12:57 am
by jaoudestudios
Do you have a url? This will help us understand.

Re: how to get the id of div tag on body onload event

Posted: Thu Mar 19, 2009 1:19 am
by php_east
iframe is another window, so you need to call window of *that* frame for your javascripts.
lookup iframe window processing. document.getElements refers to current window only, not the iframe window.