I would not say the best way, just a way. If he had multiple forms on a page
he could just say document.forms[0] or document.forms[1] etc...etc...




Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "Kreig Zimmerman" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 17, 2002 10:55 AM
Subject: Re: Dynamic form actions


> ..which works if that is the only form on the page.
>
> The best method is to refer to it as document.forms['formname']
>   ----- Original Message -----
>   From: Douglas Brown
>   To: CF-Talk
>   Sent: Thursday, July 18, 2002 1:46 PM
>   Subject: Re: Dynamic form actions
>
>
>   or use document.forms[0]
>
>
>
>
>   Douglas Brown
>   Email: [EMAIL PROTECTED]
>   ----- Original Message -----
>   From: "Matthew R. Small" <[EMAIL PROTECTED]>
>   To: "CF-Talk" <[EMAIL PROTECTED]>
>   Sent: Thursday, July 18, 2002 10:51 AM
>   Subject: RE: Dynamic form actions
>
>
>   > Try replacing document.formname.action with this.formname.action and
>   > replace formname with the name of the form.
>   >
>   > - Matt Small
>   >
>   > -----Original Message-----
>   > From: Matthew Friedman [mailto:[EMAIL PROTECTED]]
>   > Sent: Thursday, July 18, 2002 1:10 PM
>   > To: CF-Talk
>   > Subject: RE: Dynamic form actions
>   >
>   >
>   > I tried this code.
>   >
>   > Works great in IE and Modzilla, but not in Net 4.7
>   >
>   > any suggestions
>   >
>   > matt
>   >
>   > -----Original Message-----
>   > From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
>   > Sent: Thursday, July 18, 2002 12:54 PM
>   > To: CF-Talk
>   > Subject: RE: Dynamic form actions
>   >
>   >
>   > Sure it is:
>   >
>   >
>   > <input type="Image" src="image1.gif" onclick="document.formname.action =
>   > 'page1.cfm'; document.formname.submit();"> <input type="Image"
>   > src="image2.gif" onclick="document.formname.action = 'page2.cfm';
>   > document.formname.submit();">
>   >
>   >
>   > - Matt Small
>   >
>   >
>   > -----Original Message-----
>   > From: Matthew Friedman [mailto:[EMAIL PROTECTED]]
>   > Sent: Thursday, July 18, 2002 12:38 PM
>   > To: CF-Talk
>   > Subject: Dynamic form actions
>   >
>   >
>   > Is there a way to have a form with two  images as buttons, but will send
>   > the form fields to a different url.
>   >
>   > i.e. you have two form fields
>   > Username
>   > Password
>   >
>   > and image A and Image B
>   > If you hit image A the form is posted to www.a.com
>   > and if you hit image B the form is posted to www.b.com
>   >
>   > the JavaScript to submit the form is simple but can you control the
>   > "action" location.
>   >
>   > Any help would be great.
>   >
>   >
>   > Matt Friedman
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to