I do this with Cold Fusion:

In the form.

<input type="submit" value="Finished" name="Summary">
<input type="submit" value="Add More" name="Action1">

on action page....

<cfif isDefined("FORM.Action1")>
        <cflocation url="timeentry1_action.cfm">
<cfelseif isDefined("FORM.Summary")>
        <cflocation url="timeentry_summary.cfm">
<cfelseif...

If any other form fields are passed, you can use URL Variables to pass them
from the action page.

To make it happen via JavaScript, use the event handler OnSubmit().  It
should get which button was clicked from the name of the button (this can be
passed, or determined programitcally, I think, I just pass it), then do a
JavaScript relocation and THEN return false to prevent the form from fully
submitting.  If you used button types for the input statements, then you
could use the OnClick() handler and you don't need to return false to
prevent a submit.


> -----Original Message-----
> From: Angel Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 7:50 AM
> To: CF-Community
> Subject: Two submit buttons..javascript again sorry
>
>
> Umm..I know several of you have done this before.
>
> Single Form.
>
> One button to go one place..
>
> Other button to go another place..
>
> <!--- END Data Validation --->
>
> <input type="submit" value="Finished" > (to go to timeentry_summary.cfm)
> <input type="submit" value="Add More" > (to go to timeentry1_action.cfm)
>
> </FORM>
>
>
> Uhh..what's the javascript to do this again ?
>
> :)
>
> -Gel
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to