HighDots Forums  

document.forms[formName].elemName

Javascript JavaScript language (comp.lang.javascript)


Discuss document.forms[formName].elemName in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: document.forms[formName].elemName - 05-26-2008 , 03:29 AM






Gregor Kofler wrote:
Quote:
Thomas 'PointedEars' Lahn meinte:
You're right. And the moon consists of green cheese. [psf 4.17]

I'm not a hundred percent positive about the "green". But "cheese" -
yes: Wallace and Gromit verified that [1].
D'oh, seems I'll have to update that psf


Regards,

PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16


Reply With Quote
  #22  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: document.forms[formName].elemName - 05-26-2008 , 03:43 AM






Stanimir Stamenkov wrote:
Quote:
Sun, 25 May 2008 21:50:22 -0700 (PDT), /VK/:
var b = document.createElement('BUTTON');
b.type = 'button";
is safe to use on any modern browser with document.createElement
support because it is "standards-compliant"? Right? Or not right?

Doesn't seem standards-compliant as the 'type' attribute of
HTMLButtonElement objects is defined to be read-only.
One wonders, though, why that is, given that the `type' attribute of HTML
4.01/XHTML 1.0 BUTTON/button elements may assume one of three possible values:

http://www.w3.org/TR/1999/REC-html40...ml#edef-BUTTON
http://www.w3.org/TR/2000/REC-xhtml1...ml1-strict.dtd

Seems like an obvious error in the DOM 2 HTML Specification to me.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann


Reply With Quote
  #23  
Old   
Stanimir Stamenkov
 
Posts: n/a

Default Re: document.forms[formName].elemName - 05-26-2008 , 04:52 AM



Mon, 26 May 2008 10:43:00 +0200, /Thomas 'PointedEars' Lahn/:
Quote:
Stanimir Stamenkov wrote:

Doesn't seem standards-compliant as the 'type' attribute of
HTMLButtonElement objects is defined to be read-only.

One wonders, though, why that is, given that the `type' attribute of HTML
4.01/XHTML 1.0 BUTTON/button elements may assume one of three possible values:

http://www.w3.org/TR/1999/REC-html40...ml#edef-BUTTON
http://www.w3.org/TR/2000/REC-xhtml1...ml1-strict.dtd

Seems like an obvious error in the DOM 2 HTML Specification to me.
The 'type' attribute of HTMLInputElement has been read-only in the
DOM Level 1 but changed in DOM Level 2. As to why the 'type'
attribute of HTMLButtonElement was left read-only in DOM Level 2 I
could only speculate it is because that's how it is implemented in
Internet Explorer:

http://msdn.microsoft.com/en-us/libr...96(VS.85).aspx

Seems one could use instead:

var btn = document.createElement('button');
btn.setAttribute('type', 'reset');

--
Stanimir


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.