Re: Javascript headaches... help!
by "Valerie L. Criswell" <valerie(at)suresource.net>
|
Date: |
Wed, 14 Feb 2001 17:13:36 -0500 |
To: |
"Davies, Elizabeth H." <EHDavies(at)West.com>, "HWG-technique Mailing List \(E-mail\)" <hwg-techniques(at)hwg.org> |
References: |
wtc |
|
todo: View
Thread,
Original
|
|
How about using CSS to make the buttons look different instead of using the
images? You can change the background color, font style, size, and font
color.
~Val
----- Original Message -----
From: "Davies, Elizabeth H." <EHDavies(at)West.com>
To: "HWG-technique Mailing List (E-mail)" <hwg-techniques(at)hwg.org>
Sent: Wednesday, February 14, 2001 3:31 PM
Subject: Javascript headaches... help!
> We have a site that runs a heavy backend, and the html pages are
dynamically
> rendered by the cgi script. Very heavy validation requirements on the
> frontend using javascripting.
>
> The problem: The client wants graphic submit buttons and popup alert boxes
> for form validation. Usually not an issue BUT
>
> On one page there are three 'submit' buttons on one form associated with
two
> javascript events.
>
> We tried using onClick event to call the functions from the
> <submit name=1 id=1 type=image.... onClick="return blah()">
> <submit name=2 id=2 type=image.... value="reset">
> <submit name=3 id=3 type=image.... onClick="return blah2()">
> and it works everywhere EXCEPT NN4. Netscape 4 (any version) apparently
will
> not support an onEVENT handler within the submit button in this manner.
NN6,
> 6.01, IE4+ all work nicely and pop up all the alerts. NN4 completely
ignores
> the javascript functions.
>
> If we put an onSubmit into the form along with the action, we can only
call
> one of the functions (which all have mutually exclusive validation
functions
> (one will work only if fields are all empty: the other if all fields have
> proper values)); and the reset button can't clear the MTL cache because it
> never will hit the action....Which is why the reset is being used as a
> submit instead of a reset.
>
> We have successfully used the <form onSubmit=blah() action=script.cgi>
with
> one submit and a simple graphical anchored reset in all browser versions.
>
> Does anyone have any ideas on how to implement more than one???
>
> Elizabeth Davies
> West Interactive
> Systems Development
> Web Designer
> (402)573-3386 (West6: X206-7562)
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA