Click to See Complete Forum and Search --> : javascript and frames
Djamboff
04-08-2003, 04:25 AM
Hi. I want to ask a question : can I access by javascript an element ,
like
document.forms[i].elements[j] - but when I use frame (may by
window.frame ...) .I will be very happy to hear something about
that.Thanks. Valentine.
Nevermore
04-08-2003, 05:57 AM
If I understand you coorectly, then the answer is yes, you can access other frames on a page. Just replace document with the frame name. E.g. topframe.form. etc
requestcode
04-08-2003, 07:28 AM
I believe the format is:
parent.frame_name.document.form_name.field_name.value
or
top.frame_name.document.form_name.field_name.value
or if it is the first frame and the first form and the first element then this would work:
parent.frames[0].document.forms[0].elements[0].value
second frame:
parent.frames[1].document.forms[0].elements[0].value
Nevermore
04-08-2003, 07:35 AM
You don't need all that unless you're dealing with multiple windows.
durga
04-09-2003, 04:52 AM
Hi,
I've a question regarding frames.
In my application I've 2 frames which contain 2 jsp page.
When I resize the window (minimize or maximize) some of javascript functions written in the jsp pages not found.But when I click on page source option of browser it shows all the javascript functions.
And when I reload the page it works fine.
could you suggest something on this ?
Thanks in advance.