[Javascript] how do you access a form element from another frame ?

BEKIM BACAJ trojani2000 at hotmail.com
Fri Dec 5 03:09:21 CST 2003


Frames are separate browser instances, konsider them as differen persons or 
fisycally separatedobjects.
It's the same as dialing your apartment number to ring your first neibours 
phone.

Where is the onclick event taking place, where does it send alert? There are 
also some security issues with forms residing in different windows. Yes 
there is a way, but I never used it, so I can't remember, -lots of 
workarounds, very long declarations, -simply doesn't pay the nerves.

But if I find it I will get back to you soon as soon as posible.


>From: "DEV" <dev at qroute.net>
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: "[JavaScript List]" <javascript at LaTech.edu>
>Subject: [Javascript] how do you access a form element from another frame ?
>Date: Thu, 4 Dec 2003 20:25:59 -0800
>
>Here is the situation;
>
>
>_______________________
>
>          ( frameGreen )
>_______________________
>                            |
>                            |
>                            |
>( frameBlue )        | ( frameYellow )
>                            |
>                            |
>                            |
>_______________________
>
>          ( frameRed )
>_______________________
>
>
>frameYellow has a form named frm1 and a textarea called textArea1
>
>how does a button on the frameBlue update the value in the textArea1
>
>I tried the following, all failed.
>
>onClick="top.frameYellow.document.frm1.textArea1.value='X'"
>
>onClick="top.frameYellow.window.document.frm1.textArea1.value='X'"
>
>onClick="parent.frameYellow.document.frm1.textArea1.value='X'"
>
>
>
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus




More information about the Javascript mailing list