Page 1 of 1

iframes and forms

Posted: Tue May 20, 2003 12:30 am
by Guy
I have an iframe in a page.
in this iframe I have a form.
I want a button from the page to get a value from the iframe form.
I tried to use getelemntbyid to get the iframe , and I got it,
but I can't reach the form.
how can it be done?
thanks
Guy

Posted: Wed May 28, 2003 10:25 am
by Tzicha
You can access named values on a named iframe using the following syntax:

Code: Select all

frames['frame_name'].document.form_name.field_name;
The above is untested. It was quoted from the following site:
http://www.xs4all.nl/~ppk/js/?version5.html
Check the section pertaining to Frames and Windows