Hello Chris, Gil, and others,

Using JavaScript for submit-buttons does have advantages under certain
circumstances.

The most obvious use for using JavaScript on a submit-button is to perform
syntax checking on the form fields. This allows you to, for example, verify
if things like credit card numbers, phone numbers, zip codes, etc are
entered correctly. By doing so, you can immediately receive a JavaScript
alert, informing you of any input errors in the form fields.

Using this method allows the form field checking to be performed at the
client side. Advantages:

- It gives the user a faster response if something goes wrong. The
alternative is for the user to wait 10 seconds or so and then get a reply
from the server saying an error was made in some field - please try again
and hope the info you typed is still there if you click the back button on
your browser.
- It reduces network traffic. Erroneous forms will not be sent, error
messages need not be sent back.
- It reduces server load. The server will only receive syntactically correct
forms, so it doesn't have to spend time parsing bad forms and sending back
error messages if there is some kind of error (The server should still
perform these checks, but most errors will be filtered out already).

> -----Original Message-----
> 
> On 09-Sep-00,* Chris Holt*, of Planet Eros, wrote these Wise Words:
> 
> > I thought <AHREF=... was one of the most basic things in HTML. I
> > always assumed they were using JS for links to gain some advantage
> > over HREF. Why on earth would they do it, if it gains nothing???

Do not lose the perspective: almost all users nowadays have a browser
supporting JS1.2 or higher, so the question "why on earth wouldn't they do
it, if it loses nothing?" is the same question from their point of view.

> > Are we missing something, or is the average modern "webmaster"
> > really that ignorant?
> 
> I would make a bet that a large percentage... possibly more than
> 50%, but I don't have any "statistics" available personally... of
> people who write web pages have NEVER seen HTML in their life!
> They would rely on the WebPageCreation program of their choice.
> 
> : )))
> 
> I could be corrected, but I would think I would be right.
> 
> Gil

The Internet is still relatively young, and the problem that the design and
implementation are usually not separated leads to this kind of problem.
Either the designer implements using things like the aforementioned web
tools or the implementor also designs the site. Both have their
disadvantages and finding people/companies who can do both properly is hard.
HTML and JavaScript are like any other computer language: understanding the
syntax is easy, designing something good using it is a completely different
issue.

Wouter Lamee
_____________________________________________________________________
Voyager Mailing List - http://v3.vapor.com/
Voyager FAQ....: http://faq.vapor.com/voyager/
Listserver Help: mailto:[EMAIL PROTECTED]?Subject=HELP
Unsubscribe....: mailto:[EMAIL PROTECTED]?Subject=UNSUBSCRIBE

Reply via email to