W3C home > Mailing lists > Public > www-html@w3.org > October 1998

Re: How to support borwsers with javascript support ?

From: Rasmus Kaj <kaj@interbizz.se>
Date: Thu, 15 Oct 1998 05:50:14 -0400 (EDT)
To: rsharma@marketfirst.com
Cc: www-html@w3.org
Cc: kaj@interbizz.se
Message-Id: <19981015114953M.kaj@interbizz.se>
>>>>> "RS" == Ravindra Sharma <rsharma@marketfirst.com> writes:

 RS> My web page contains javascript but if a browser does not support
 RS> javascript the onsubmit gives an error saying ValidateForm() not
 RS> found.

 RS> <form
 RS> action="http://harp.marketfirst.com/watchfirst/CTIISPlugin.dll?watchfirst"
 RS> method="post" name="Follow-up Drop of Application/Solicitation of
 RS> Subscription"
 RS> onsubmit="return ValidateForm()">

 RS> I could avoid the javascript portion with using comment
 RS> <script language="JavaScript">
 RS> <!-----------

 RS> Java script functions ...

 RS> // ---------->
 RS> </script>

 RS> But the onSummit can not commented ? Is there a way ?

If a browser don't support scripting, it will ignore the onsubmit
attribute.  The problem here is that you use a browser that supports
another script language (probably an older version of javascript or m$ 
jscript (you didn't mention any browser)).

So what you should do is th write those javascript functions in
different versions of javascript and have some method to select the
right function definitions.  I admit that this seems rather tedious.

// Rasmus

kaj@cityonline.se --------------- Rasmus Kaj - http://www.e.kth.se/~kaj/
 \               CityOnLine IB Production AB - http://www.CityOnLine.se/
  \------------------------------- I link, therefore I am -- /usr/bin/ld
Received on Thursday, 15 October 1998 14:27:14 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:49 UTC