469,623 Members | 1,416 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Multiple buttons on form

How can I implement multiple buttons for a form like -
submit, cancel, logout etc.
Thanks.
Matt
Jul 19 '05 #1
5 4255
few ways... what I used to do is use the onClick to change the ACTION of the
FORM tag, then submit. You need to use TYPE=BUTTON instead of TYPE=SUBMIT
though....

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Matt" <ma**@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
How can I implement multiple buttons for a form like -
submit, cancel, logout etc.
Thanks.
Matt

Jul 19 '05 #2
What do you want them to do and what exactly are you stuck on?

Ray at work

"Matt" <ma**@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
How can I implement multiple buttons for a form like -
submit, cancel, logout etc.
Thanks.
Matt

Jul 19 '05 #3
Ok I have following code for my submit button :
<input type="image" src="submitbtn.png" border="0">
and follwoing code for my form submit :
<form name="form1" method="post" action="test1.asp">

Now I want to have both submit and cancel buttons
something like
<input type="image" src="submitbtn.png" border="0">
<input type="image" src="cacelbtn.png" border="0">
so that when submit is clicked it goes to test1.asp as
normal but when cancel is clicked it should go to
test2.asp.

Matt.


-----Original Message-----
What do you want them to do and what exactly are you stuck on?
Ray at work

"Matt" <ma**@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
How can I implement multiple buttons for a form like -
submit, cancel, logout etc.
Thanks.
Matt

.

Jul 19 '05 #4
To change the action of your form, you'd need to use client side code.
Something like:

<input type="image" src="cancelbtn.png"
onclick="this.form.action='test2.asp'">

Give that a try, and if that doesn't work, try inquiring in a client-side
scripting group such as .scripting.jscript or one of the non-MS javascript
groups.

Ray at work

"Matt" <ma**@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Ok I have following code for my submit button :
<input type="image" src="submitbtn.png" border="0">
and follwoing code for my form submit :
<form name="form1" method="post" action="test1.asp">

Now I want to have both submit and cancel buttons
something like
<input type="image" src="submitbtn.png" border="0">
<input type="image" src="cacelbtn.png" border="0">
so that when submit is clicked it goes to test1.asp as
normal but when cancel is clicked it should go to
test2.asp.

Matt.


-----Original Message-----
What do you want them to do and what exactly are you

stuck on?

Ray at work

"Matt" <ma**@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...
How can I implement multiple buttons for a form like -
submit, cancel, logout etc.
Thanks.
Matt

.

Jul 19 '05 #5
thanks ray .. it worked.
-----Original Message-----
To change the action of your form, you'd need to use client side code.Something like:

<input type="image" src="cancelbtn.png"
onclick="this.form.action='test2.asp'">

Give that a try, and if that doesn't work, try inquiring in a client-sidescripting group such as .scripting.jscript or one of the non-MS javascriptgroups.

Ray at work

"Matt" <ma**@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Ok I have following code for my submit button :
<input type="image" src="submitbtn.png" border="0">
and follwoing code for my form submit :
<form name="form1" method="post" action="test1.asp">

Now I want to have both submit and cancel buttons
something like
<input type="image" src="submitbtn.png" border="0">
<input type="image" src="cacelbtn.png" border="0">
so that when submit is clicked it goes to test1.asp as
normal but when cancel is clicked it should go to
test2.asp.

Matt.


>-----Original Message-----
>What do you want them to do and what exactly are you

stuck on?
>
>Ray at work
>
>"Matt" <ma**@discussions.microsoft.com> wrote in message >news:06****************************@phx.gbl...
>> How can I implement multiple buttons for a form like - >> submit, cancel, logout etc.
>> Thanks.
>> Matt
>
>
>.
>

.

Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by D. Shane Fowlkes | last post: by
8 posts views Thread by TJS | last post: by
5 posts views Thread by Alex Maghen | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.