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 07:43:58 2005

On 21/11/05, Schalk <schalk@xxxxxxxxxxx> wrote:
> But here is my problem:
> I want to create a simple generic reset function for forms within
> Joomla. Now, I do not know beforehand what the form name or id is and
> therefore wanted to determine this with JavaScript.

    getElementsByTagName doesn't return a simple object, but an Array
of the forms in the page. If you wanna get the first form, try
using...
function resetForm() { var tF, tFN;
  tF=document.forms[0]; tFN=tF.name; alert(tFN);
  tF.reset();
}

  btw: my name is "diego nunes". "amplexos" is a portuguese word for
"cheers", or something like that.

--
diego nunes