HighDots Forums  

form submit

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss form submit in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
-D-
 
Posts: n/a

Default form submit - 11-28-2004 , 11:06 PM






Is there a way to have a javascript function submit a form to another page
other than what the form action is set to?

For example, I have a form that is set to submit to pageB:

<form name="myformname" method="post" action="pageB.asp">

I want to have a button in the form that calls a javascript function that
would submit the form to "pageA.asp" instead.

Is this possible?

function AltSubmit() {

}

Thanks for any help.
-D-



Reply With Quote
  #2  
Old   
Ken Ford - PVII Support
 
Posts: n/a

Default Re: form submit - 11-29-2004 , 09:00 AM






http://www.javascript-coder.com/html-form/html-form-action.phtml

--
Ken Ford
Certified Dreamweaver MX 2004 Developer
PVII Support Team
http://www.projectseven.com
Team Macromedia Volunteer - Dreamweaver


"-D-" <noone (AT) nospam (DOT) com> wrote

Quote:
Is there a way to have a javascript function submit a form to another page
other than what the form action is set to?

For example, I have a form that is set to submit to pageB:

form name="myformname" method="post" action="pageB.asp"

I want to have a button in the form that calls a javascript function that
would submit the form to "pageA.asp" instead.

Is this possible?

function AltSubmit() {

}

Thanks for any help.
-D-





Reply With Quote
  #3  
Old   
Ross Riley
 
Posts: n/a

Default Re: form submit - 11-29-2004 , 09:18 AM



quick answer:
on button b
<input type='button' onclick='document.myFormName.action='pageB.asp; document.myFormName.submit();''>

Ross

Reply With Quote
  #4  
Old   
Michael Fesser
 
Posts: n/a

Default Re: form submit - 11-29-2004 , 06:23 PM



.oO(-D-)

Quote:
Is there a way to have a javascript function submit a form to another page
other than what the form action is set to?
Sure, but why would you want such an unreliable beast?

Micha


Reply With Quote
  #5  
Old   
-D-
 
Posts: n/a

Default Re: form submit - 11-29-2004 , 10:04 PM



Yep, you're right...I went with ASP to handle it. Thanks.
-D-


"Michael Fesser" <netizen (AT) gmx (DOT) net> wrote

Quote:
.oO(-D-)

Is there a way to have a javascript function submit a form to another
page
other than what the form action is set to?

Sure, but why would you want such an unreliable beast?

Micha



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.