473,583 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4417
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**@discussio ns.microsoft.co m> 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**@discussio ns.microsoft.co m> 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.a sp">

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.p ng" 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**@discussio ns.microsoft.co m> 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.f orm.action='tes t2.asp'">

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

Ray at work

"Matt" <ma**@discussio ns.microsoft.co m> 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.a sp">

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.p ng" 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**@discussio ns.microsoft.co m> 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='te st2.asp'">

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

Ray at work

"Matt" <ma**@discussio ns.microsoft.co m> 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.a sp">

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.p ng" 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**@discussio ns.microsoft.co m> 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
1842
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 function to submit the form data. However, it didn't work properly and I changed to use SUBMIT type. <INPUT TYPE="BUTTON" NAME="action1"...
2
3134
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 they want. If they need to add more, they click an "add name" button and the javascript inserts another row of input boxes. Each row should have...
0
2688
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 form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can...
3
2555
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: http://www.drpt.virginia.gov/temp1.gif All the fields on this form have validation controls on them so they can not submit the form unless all...
8
579
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
7
3093
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 as follows: Friend F0 As frmMain Friend F1 As frmStart Friend F2 As frmSearch Then in my ShowPage routine (which is passed a string "pageToShow"...
5
20004
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 separate Submit buttons. In basic HTML, I can have multiple forms on a page and the browser knows that if any of the fields for Form A have the...
5
14113
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
2074
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. My Del button works great also, but for one record at a time only. In ViewOnly mode, the user is able to highlight a single record to delete...
2
6936
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 come across a way to set the listbox value to only 1 at a time, but need multiple toggle buttons to be on their corresponding listbox item values...
0
7893
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8172
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8188
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6574
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5369
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3813
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3839
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1151
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.