how to do it by javascript?
i tried:
window.frames[framename].document.getElementByID(divname).innerHTML
is something wrong with that?
how to do it by javascript?
i tried:
window.frames[framename].document.getElementByID(divname).innerHTML
is something wrong with that?
It's getElementById(), case sensitive. The page inside the frame must be on the same domain for security reasons. innerHTML is non-standard and standard DOM methods should be used instead.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Also, the document within the iframe is referred to differently by various browsers. Since this only works on pages on the same domain, one would assume that if you have editing privileges for the top document, you have them for the one in the iframe. Put your script on it. You can then call the script from the top page in a much more consistent cross browser fashion than you can perform document actions from the top page upon the en-framed page.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
uhh.. sori but i just cant understand what your saying because im too noob in javascript. but, is there a way to access a div inside an iframe ?
That being the case, do you at least understand what being on the same domain means? If not, you need to. If you do, but the pages are not, it cannot be done using javascript alone and is probably beyond what is permitted in these forums, unless you own both domains, in which case something may be able to be worked out.
A domain, by the way is, for example:
www.somename.com
The pages have to be on the same domain.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks