Re: How to support borwsers with javascript support ?

> My web page contains javascript but if a browser does not support
> javascript the onsubmit gives an error saying ValidateForm() not found.
> 
> <form
> action="http://harp.marketfirst.com/watchfirst/CTIISPlugin.dll?watchfirst"
> method="post" name="Follow-up Drop of Application/Solicitation of
> Subscription"
> onsubmit="return ValidateForm()">
> 
> I could avoid the javascript portion with using comment
> <script language="JavaScript">
> <!-----------
> 
> Java script functions ...
> 
> // ---------->
> </script>
> 
> But the onSummit can not commented ? Is there a way ?
Sure, you could do something like this:
<form
action="someaction"
method="post" name="somename"
<script language="JavaScript">
<!--// hide this
document.write('onSubmit="return ValidateForm()"
//-->
</script>
>

(don't forget the > after </script> )
if a browser supports javascript, it writes the onSubmit, if not, it
doesn't.

Greetz,
Taco.
                  \|||/
                 ( o o )
                  \ V /
---------oOOOo-----| |-----oOOOOo---------
           |     T//-\\co    |
           -------------------
Anyone who reads THIS twice is MAD !!
Voice: (+31) 070-4279822
E-Mail: taco@ch.twi.tudelft.nl
Homepage: http://ch.twi.tudelft.nl/~taco/

Received on Thursday, 15 October 1998 04:22:55 UTC