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: VK <schools_ring@yahoo.com>
Date: Mon Jan 30 2006 - 13:38:30 CET

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. Even in case if some
...strange person called his/her form "name" you still can read it (for
whatever reason) as document.forms[0]['name']. Other possible issues
are covered by my previous posts. But I guess that the issue is to
construct a less-than-probable situation and die-or-solve-it by DOMx
methods. In such case I'm not an amateur of abstract puzzles.

It is much more interesting then to OP (possibly) to challenge himself
with submit button named (again by some abstract ... strange person)
"submit" and call submit method for such form:

<input type="submit" name="submit" value="Submit">

document.forms[0].submit() == opps;

more ideas?

At least the latter happens from time to time.
Received on Tue Feb 7 21:27:16 2006