Subject: Re: CGI vs. JavaScript From: howens@tl.com (Howard Owens) Date: Mon, 21 Oct 1996 14:12:42 +0100
How the Web Was Won
Subject: Re: CGI vs. JavaScript
From: howens@tl.com (Howard Owens)
Date: Mon, 21 Oct 1996 14:12:42 +0100
Sender: owner-online-news@planetarynews.com
Precedence: bulk
Status: RO
X-Status:
Scott Anderson wrote:
>Quick (and admittedly broad) question:
>
>Can JavaScript be used instead of CGI to create interactive form, etc., or
>does each language have its own function and uses with little overlap?
>
The quick answer is yes.
If you hunt around (sorry I don't have the URLs handy) there are some
sample javascripts that do form handling. I think they are pretty flexible
and can be easily hacked to fit your specific needs. I've never used
javascript to handle forms, but I've seen these scripts. I can't vouch for
their effectiveness.
There is a warning, however: Javascript only runs with the latest and
greatest browsers. CGI runs will almost all current browsers.
Javascript and CGI are not mutually exclusive and it should be possible to
create a form that will be handled by javascript, but still work with a CGI
where necessary. If a browser doesn't handle javascript, the CGI script
will handle it instead. The advantage of this is that javascript runs
client-side so it processes information faster. CGI is server-side and a
client must send the information to the server, wait for a reply and get a
message back saying everything is ok and now do the next task.
I have used client-side maps, which is essentially a basic javascript. They
work very well, for those browsers that support them. I've also seen sites
that use a client-side image map in conjunction with a server-side map. If
the map-request isn't handled by the client first, the server gets the
request and handles it. This ensures that even older browsers can use the
image map.
Best,
H.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Owens
howens@tl.com
Online Editor
Affinity Group
Roads to Adventure (http://www.tl.com)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+---------------------------------------------------------------------------+
Posted to ONLINE-NEWS. Made possible by Nando.net - http://www.nando.net
From owner-online-news@nando.net Mon Oct 21 21:42:47 1996
Received: from parsifal.nando.net (root@parsifal.nando.net [152.52.2.7]) by cnj.digex.net (8.6.12/8.6.12) with ESMTP id VAA11390 ; for ; Mon, 21 Oct 1996 21:42:46 -0400
Received: (from root@localhost) by parsifal.nando.net (8.7/8.6.9) id UAA05999 for online-news-outgoing; Mon, 21 Oct 1996 20:01:40 -0400 (EDT)
Received: from server.indra.com (server.indra.com [204.144.142.2]) by parsifal.nando.net (8.7/8.6.9) with ESMTP id UAA05966 for ; Mon, 21 Oct 1996 20:01:32 -0400 (EDT)