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
how to get the id of div tag on body onload event
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: how to get the id of div tag on body onload event
Do you have a url? This will help us understand.
Re: how to get the id of div tag on body onload event
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.
lookup iframe window processing. document.getElements refers to current window only, not the iframe window.