how to call another form object?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

how to call another form object?

Post by valen53 »

my page was using frame to build up. the problem now are when i submit the form at the below frameset , i want to clear the field at the above frameset. b'cos contain 2 form right now, how to call another form object ? something like VB .. form1.txtfield.text , form2.txtfiled.text..
but this ways cannot used in java script.
anyone call me? thank u
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

A solid tutorial on forms and javascript is

http://hotwired.lycos.com/webmonkey/99/30/index4a.html

That site has also plenty of other javascript-related tutorials.

To access a form ("formname") with a formfield ("formfield") cross-frames in javascript use

Code: Select all

parent.document.formname.formfield.value=...
Worthwhile having for reference purposes:

http://www.dannyg.com/ref/jsquickref.html
Post Reply