473,388 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

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 4406
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
The ASP page has multiple buttons, and when the user clicks different buttons, it will submit the form data to different URLs. My first approach was to use BUTTON type, and triggers javascript...
2
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as...
0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
3
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: ...
8
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
4
by: ApexData | last post by:
I have a continuous form that has Allow- Add/Edit/Del set to False, so that the form is in View mode only. I have New/Edit/Del buttons in the form header. My New & Edit buttons work as a like. ...
2
by: 6afraidbecause789 | last post by:
Hi - Has anyone ever used toggle buttons to select items in a listbox? I'd like to put about 24 toggle buttons on an unbound form that select or deselect items in a multiple select listbox. I've...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.