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

Flavio Gomes flavio at economisa.com.br
Fri Dec 5 06:56:50 CST 2003



   Well.. what's your browser?

   The attached script I'm sending seems to work fine under Mozilla and 
Konqueror (linux, yeahyeah)... have a look at it..
  


DEV wrote:
> 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'"
>


-- 
Flavio Gomes de Araujo Pego
Estagiário - Técnico em Informática
NUPRO - (31) 3274-1811 - Ramal 232
-------------- next part --------------
A non-text attachment was scrubbed...
Name: framesTest.zip
Type: application/x-zip
Size: 1640 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20031205/9ada8583/attachment.bin>


More information about the Javascript mailing list