473,473 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Mutiple submit buttons in a single page

Hi,

I pretty sure I've seen this problem addressed before, but I can't find any
references.

The short story is that I have I have multiple submit buttons on a page,
each providing different functionality. For example, I have a search option,
a log in option and a save text option.

I would like to handle the submits in the Click event of each button. the
problem is, that since only one form is allowed per page, only the first
button's Click event fires.

I've tried capturing keypresses with client-side code in an attempt to force
the user to click the corresponding button for each set of functionality,
but have found that to be very unreliable across browsers.

Are there any resources available that address this problem?

Thanks,
Bob Lehmann

Nov 22 '05 #1
4 1931
To clarify - I'm trying to handle the Click when the ente key is pressed.

Bob Lehmann

"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
Hi,

I pretty sure I've seen this problem addressed before, but I can't find any references.

The short story is that I have I have multiple submit buttons on a page,
each providing different functionality. For example, I have a search option, a log in option and a save text option.

I would like to handle the submits in the Click event of each button. the
problem is, that since only one form is allowed per page, only the first
button's Click event fires.

I've tried capturing keypresses with client-side code in an attempt to force the user to click the corresponding button for each set of functionality,
but have found that to be very unreliable across browsers.

Are there any resources available that address this problem?

Thanks,
Bob Lehmann

Nov 22 '05 #2
Are you talking about ASP.NET? if yes, are the submit buttons you mentioned
WebCobtrol buttons? If your answer is yes, then all these buttons have
server side Click event that you can handle. I do not understand why you
call this a problem, unless these buttons are all HTML buttons and not run
at server (i.e without "runat='sever'" attribute). But since you are asking
in .NET group,...

"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
Hi,

I pretty sure I've seen this problem addressed before, but I can't find any references.

The short story is that I have I have multiple submit buttons on a page,
each providing different functionality. For example, I have a search option, a log in option and a save text option.

I would like to handle the submits in the Click event of each button. the
problem is, that since only one form is allowed per page, only the first
button's Click event fires.

I've tried capturing keypresses with client-side code in an attempt to force the user to click the corresponding button for each set of functionality,
but have found that to be very unreliable across browsers.

Are there any resources available that address this problem?

Thanks,
Bob Lehmann

Nov 22 '05 #3
> Are you talking about ASP.NET?
Yes.
are the submit buttons you mentioned WebCobtrol buttons? Yes.
then all these buttons have server side Click event that you can handle. I know.
I do not understand why you call this a problem As I said, because you are only allowed one form on a page only the first
button's Click event fires when a user presses Enter.

Bob Lehmann

"Norman Yuan" <No***@NoExist.No> wrote in message
news:TLURd.22981$AO.1677@clgrps12... Are you talking about ASP.NET? if yes, are the submit buttons you mentioned WebCobtrol buttons? If your answer is yes, then all these buttons have
server side Click event that you can handle. I do not understand why you
call this a problem, unless these buttons are all HTML buttons and not run
at server (i.e without "runat='sever'" attribute). But since you are asking in .NET group,...

"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
Hi,

I pretty sure I've seen this problem addressed before, but I can't find

any
references.

The short story is that I have I have multiple submit buttons on a page,
each providing different functionality. For example, I have a search

option,
a log in option and a save text option.

I would like to handle the submits in the Click event of each button. the problem is, that since only one form is allowed per page, only the first
button's Click event fires.

I've tried capturing keypresses with client-side code in an attempt to

force
the user to click the corresponding button for each set of functionality, but have found that to be very unreliable across browsers.

Are there any resources available that address this problem?

Thanks,
Bob Lehmann


Nov 22 '05 #4
Bob,

Than you should probably set the focus on the next. I could not do that
using serverside code yet, because it has to be done as the button is placed
in HTML on the page by the browser.
This is a textbox, however a button would be the same in my opinion.

<INPUT tabindex="1" id="TextBox1" type="text" size="27">

//This should be the last rows in your html aspx file

<script language="JavaScript">
document.all("fieldid").focus();
</script>
</HTML>

I hope this helps a little bit?

Cor
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bob Lehmann | last post by:
Hi, I pretty sure I've seen this problem addressed before, but I can't find any references. The short story is that I have I have multiple submit buttons on a page, each providing different...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
0
by: deepak | last post by:
i have set multiple selection property in bith listboxes(html control) to true. i have taken 2 buttons(html control) say Button1,Button2.now i want to add mutiple selected items to another listbox...
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...
10
by: underground | last post by:
I need a little help figuring this one out. I have a script that I've modified to post mutiple binary files into a single row but instead of copying the indiviuals files it rewrites the first file to...
7
by: Bjorn Sagbakken | last post by:
Hello. There maybe an simple answer to this, but sometimes one get a strange blindness when working intensely on one single problem. I'm using ASP.NET 2003, building pages that include 3 user...
5
by: Alex | last post by:
Hello, I hope I can explain this properly. I'm writing an application with a tabbed-based navigation, and a form which gets filled out by users will be split into 5 subtabs. What I need is...
7
by: Petr Vileta \(fidokomik\) | last post by:
I have a form with few text inputs. Every text input is followed by image type input. In this form I want to have 1 submit button on the top. A problem I want to resolve is: when user type...
3
by: xtremebass | last post by:
Hi Bytes. i have 3 submit buttons namely click1,click2 and click3 . if i press the any of one submit button page submitted appropriate page correctly, But the problem is display the all...
1
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
0
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,...
1
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
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...

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.