....so I asked said, "You use WHAT browser?" 

I don’t consider Netscape 2 (or IE pre 5) when I use the phrase 'cross
browser compatible'. Especially when dealing with JS and/or CSS.


-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 21, 2006 5:42 PM
To: CF-Talk
Subject: RE: Javascript help

> > document.formname.fieldname.value is about as standard as it 
> > gets AFAIK.
>
> Yes, it is as vanilla as it gets and easiest for most people 
> to read and understand. But if you'd like to make it NOT work 
> in all browsers that can read JS you can try some of these lol
> 
> document.forms[0].myfield.value
> document.forms[0]['myfield'].value
> document.forms['myform'].myfield.value
> document.forms['myform']['myfield'] .value

Actually, the first one in Bobby's list (document.forms[0].myfield.value) is
the most compatible; it works in Netscape 2, while
document.formname.myfield.value will not, if I recall correctly. Support for
addressing forms (and elements) using array notation was introduced with the
first version of JavaScript.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264842
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to