Re: "getAttribute" returns a child element instead of ...?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: "getAttribute" returns a child element instead of ...?

From: Randy Webb <HikksNotAtHome@aol.com>
Date: Mon Jan 30 2006 - 21:44:49 CET

Thomas 'PointedEars' Lahn said the following on 1/30/2006 8:25 AM:
> VK wrote:
>
>> Jasen Betts wrote:
>>> hmm...
>>> document.forms[0].attributes['name'].value
>>> or has someone already suggested that?
>> It was suggested to use form methods for form. [...]
>
> There is no such thing as a "form method".

You missed the boat on this one Thomas. He didn't say use the "form
method", he said "use form methods for form" meaning, you use methods
related to the form to manipulate forms.

One "method" of accessing a form:

document.form['formID']

Another "method" to access it:

document.getElementById('formID')

Neither of which is a "method of the form" but it is a "form method" to
access the form.

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Received on Tue Feb 7 21:27:54 2006