Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Accessing form name


  • From: dnunes at gmail.com (diego nunes)
  • Subject: [Javascript] Accessing form name
  • Date: Mon Nov 21 06:41:25 2005

On 21/11/05, Schalk <schalk@xxxxxxxxxxx> wrote:
> What is the best way to obtain a form name if it is not possible to pass
> it into the script as such: formFunction(this);

    You want the "name", having the instance of the form, or wanna get
the instance, based onde the "name"?

  1) instance named "formInstance":
 alert(formInstance.name);

  2) form named "formanswer":
  alert(document.forms['formanswer']);
     or, better, if you have an unique ID:
  alert(document.getElementById('formanswer'));

  Amplexos.

--
diego nunes