[Javascript] Javascript - Form value undefined

David Lovering dlovering at gazos.com
Tue Nov 11 10:56:17 CST 2003


Re-reading my earlier remarks, it appears I left some of the context out of
the discussion.

Yes, Chris is correct -- client side scripts run independently of the server
(thank God!).

What I was thinking of in more general terms was the total "forms-handling
delay" which
includes the latency to download the Javascript in the first place, the time
for it to execute
on the client machine, and the time to validate and/or return the results to
the server once
the form has been completed and submitted for processing.  The first two
criteria will
depend on the number of JavaScript routines, their complexity, and the
intrinsic operation
time required to execute.

Given that a big chunk of any JavaScript processing cycle will be largely
contingent on the
size and complexity of its major loops, doing anything to stream-line the
number of steps
and/or elements contained in these loops will be time well spent.  This is
one reason why I
generally discourage knee-jerk insertions of "document.forms[0].all" style
objects, particularly
when the invocation is followed immediately by a loop that checks EVERYTHING
inside
the .all object set.  If you've got a really gnarly form (like the IRS 1040
electronic tax form),
this could add a LONG delay.

I would encourage developers to use a stop-watch to clock the
download/build/execution
cycle for their scripts, average it over many trials on different browsers
and/or OS platforms,
and develop a "working average" delay expectation.  A lot of "canned" build
environments
(like ASP and ColdFusion) look real sexy, but don't do well in real-time
clocked benchmarks.

-- Dave Lovering

----- Original Message ----- 
From: "Chris Tifer" <christ at saeweb.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Tuesday, November 11, 2003 7:51 AM
Subject: Re: [Javascript] Javascript - Form value undefined


>
> > This runs a LOT faster, particularly if your web page gets a lot of hits
>
> How would a client-side script run faster or slower depending on the
number
> of hits to a site? Everything is processed on individual's computers so
site
> traffic would mean absolutely nothing when determining execution speed.
It's
> all dependant on the client.
>
> Chris Tifer
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>





More information about the Javascript mailing list