From owner-freebsd-hackers Sat Feb 21 09:23:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA17482 for freebsd-hackers-outgoing; Sat, 21 Feb 1998 09:23:21 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from phoenix.volant.org (phoenix.volant.org [205.179.79.193]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id JAA17475 for ; Sat, 21 Feb 1998 09:23:16 -0800 (PST) (envelope-from patl@phoenix.volant.org) From: patl@phoenix.volant.org Received: from asimov.phoenix.volant.org [205.179.79.65] by phoenix.volant.org with smtp (Exim 1.62 #1) id 0y6Idv-0004wQ-00; Sat, 21 Feb 1998 09:23:15 -0800 Received: from localhost by asimov.phoenix.volant.org (SMI-8.6/SMI-SVR4) id JAA00206; Sat, 21 Feb 1998 09:21:25 -0800 Date: Sat, 21 Feb 1998 09:21:25 -0800 (PST) Reply-To: patl@phoenix.volant.org Subject: Re: Javascript for project page? To: hackers@FreeBSD.ORG In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Sat, 21 Feb 1998, Mark Mayo wrote: > >Hi all. I've been coding up a prototype "FreeBSD Project Database" > >page, and I'm seeking opinions on if I should use Javascript.. > >Javascript lets me do some handy error checking on the client side > >before requests and such get sent into the database server, as well > >as opening up some better design possibilities... I'm concerned however > >that the use of Javascript will limit the number of people that can > >use the site. > > > >Opinions? Is *everybody* using Netscape now, or do a significant > >... I'd go for an intermediate solution. Use the JavaScript for error checking; but design the page so that it still works without the JavaScript portions. Remember, even with JavaScript doing error checking, the server side forms handling should -always- do it's own error checking. There is no guarantee that the data actually came from your form... 'Better design possibilities' is a vague and covers a lot of possible territory. Would PHP help you retain some of them? Since it is a server-side module, the results don't require any specific browser capability beyond the version of HTML being emitted. And since the PHP script can check the browser id string, it can modify the HTML that is returned based on a priori knowlege of the browser's capabilities. Of course it can't tell whether a Netscape/MSIE user has turned off JavaScript; but it could avoid emitting the SCRIPT blocks and NOSCRIPT tags to browsers that are known not to support JavaScript at all. -Pat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message