By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,630 Members | 1,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,630 IT Pros & Developers. It's quick & easy.

Mutiple submit buttons in a single page

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
> 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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.