JRS: In article <1160005825.649585.304360@h48g2000cwc.googlegroups .com>,
dated Wed, 4 Oct 2006 16:50:25 remote, seen in
news:comp.lang.javascript, web.dev <web.dev.cs@gmail.composted :
Quote:
>
>Try using the following syntax instead, replace where necessary:
>
>document.forms["SearchForm"].elements["FirstName"].value
>document.forms["SearchForm"].elements["LastName"].value
>document.forms["SearchForm"].elements["Phone"].value
>etc. etc.
var SFe = document.forms["SearchForm"].elements
SFe["FirstName"].value
SFe["LastName"].value
SFe["Phone"].value
should be both faster and smaller.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/>? JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.