Forum Moderators: open
window.frames['<frame_name/frame_id>'].document.forms[0].elements[0]
//get iframe object
fobject = document.getElementById('frame_name');
then this will be your reference:
fobject.document.forms[0].elements[0]
That's probably the easiest way since there's an element inside your document that has it's own document object and its own viewport and everything. This applies to other stuff as well - styles won't carry over to an iframe - that document inside has to get it's own styles.
It's a standard security measure that ALL browsers should follow.
If the src of the frame is from the same site as the document containing your javascript, it shouldn't be a problem.