iframes and forms

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Guy
Forum Commoner
Posts: 53
Joined: Sun Jan 12, 2003 3:34 am

iframes and forms

Post 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
Tzicha
Forum Newbie
Posts: 8
Joined: Wed Sep 04, 2002 9:54 am

Post 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
Post Reply