I use a getElementById in page and works well.
however, it does not work when i put this page into frame structure.
myobject.newobject = document.getElementById(''PP'');
how do I change this syntax?
getElementById works perfectly well with pages inside a frameset. However, if you are trying to access elements in a different frame, then you need to ensure that:
1. You use the correct DOM path to the frame and element, rather than just saying "document" (which will clearly not work), and
2. You ensure that both frames are in the same domain, otherwise you will run into security restrictions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.