want your cake and to eat it to eh Ken? I am not sure I am understanding
the problem fully because all your answers where the right ones, just not
necessarily the right combination. If your onSubmit is a javascript
function, use that instead of the .submit() on the onclick event for your
image. Also, a trick I learned is that you can just as easily use a
"button" type if you are not requiring some images or image rollovers for
your button actions. By using the button type, you get the look and feel of
your other buttons (submit, cancel, ect), but they do not forcibly trigger
the onSubmit() event for the form, leaving you in control.
Or, combine some of the onSubmit() code with other code and provide a custom
javascript function for that button alone. In any event, you can see that
the combination of changing the fuseaction in the form (via the .value
property of the forms element object) and doing the .submit() is the happy
way to go...you just need the right combination of elements to make sure the
proper events are triggered in the right order.
Mike Craig
-----Original Message-----
From: Ken Beard [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 9:07 PM
To: Fusebox
Subject: image button navigation
how do ya'll handle the situation where you've got 1 form that needs to go
2 different places, depending on which button is clicked when the button is
an image. I have been using the onClick handler of the type="image" button
to set this.form.fuseaction.value to whatever.. but I ran into a problem
with this recently: netscape 4.7 isn't firing that onClick event before
submitting. If I use an img and an anchor tag and
document.forms[0].fuseaction.value=blah;document.forms[0].submit(); then my
onSubmit event for that form doesn't fire, killing my javascript form
validation.
the only option I see at this point is to go with the img/anchor solution
and try to make an invisible img button somewhere on the page and use its
click() method, assuming netscape recognizes that. but that's kinda messy
and i don't even know if it will work.
Ideas/solutions on this greatly appreciated, i'm in kind of a tight fix
here and i've got to get this working quick.
thanks
Ken Beard
Manager, Application Development
Stone Ground Solutions
5100 West Kennedy Blvd, Suite 430
Tampa FL 33602
813.387.1235 voice
866.767.4051 toll free
813.387.1237 fax
www.stoneground.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists