[Javascript] formName?

Trey H tutwabee at hotmail.com
Thu May 2 20:30:22 CDT 2002


Steve,
You can use window.document.forms[0].name to find the name of your form.  
Also, make sure your javascript code that uses this is written to the 
document AFTER the form itself.  I make that mistake very often with 
javascript and forms because I usually put the javascript in the head 
command.

====================================
Trey: tutwabee at hotmail.com
Get free JavaScripts at the Blue Dragon!
Just go to:
http://www.websiter.biz
====================================
Make money by being online:
http://www.degoo.com/index.php?refid=tutwabee
===================================
Earn free traffic for your website easily:
http://tools.addme.com/servlet/popview?id=52260
====================================



>From: "Steve" <extstarrfam at cox-internet.com>
>Reply-To: javascript at LaTech.edu
>To: <javascript at LaTech.edu>
>Subject: [Javascript] formName?
>Date: Thu, 2 May 2002 20:18:59 -0500
>
>I am using IE 5.5 version 4.  I am having a hard time
>working my way down throught the form objects.  To
>discover the reason why, I have tried to get the form
>name.  I have used the formName property and some other
>useless code to get what the browser thinks the name of
>the form is.  Here is the form tag information (<form
>id="choices" name="choices">).  Here is some of what I
>have tried:
>
>var Pname = window.parent.name; //worked
>var Wname = window.name; // worked
>var Fname = window.document.formName; and  var Fname =
>window.form (with and without .name); and var Fname =
>window.document.forms[0];
>
>I am try to work my way down the objects path one
>object at a time.  Does any one have an idea?
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript






_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the Javascript mailing list