473,404 Members | 2,137 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,404 software developers and data experts.

Order of buttons?

My boss wants me to do some forms without any type of scripts, just
pure HTML/ASP.
I have this table with 3 rows, each row has an <input=text> and ends
with an <input type=submit> buttons, and the last row has what I want
to be the default <input type=submit>. Problem is, when I press
<enter> in any of the text fields, it acts as if the first row's submit
button was pressed.
How can I affect this behaviour if I want to keep the appeareance of
the page? (without scripts), it should also work in most browsers (not
only IE)

Oct 6 '05 #1
3 1449
On 06/10/2005 17:37, wo******@gmail.com wrote:

[snip]
I have this table with 3 rows, each row has an <input=text> and ends
with an <input type=submit> buttons, and the last row has what I want
to be the default <input type=submit>. Problem is, when I press
<enter> in any of the text fields, it acts as if the first row's submit
button was pressed.
This is the problem with using multiple submit buttons.
How can I affect this behaviour if I want to keep the appeareance of
the page? [...]


IE will choose the first submit button as the default. Other buttons can
be activated with the Enter key, but they must be given focus first
which won't happen if the user is interacting with another control (and
isn't behaviour that could be reliably changed with a script, anyway).

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Oct 6 '05 #2
wo******@gmail.com wrote:
My boss wants me to do some forms without any type of scripts, just
pure HTML/ASP.
I have this table with 3 rows, each row has an <input=text> and ends
with an <input type=submit> buttons, and the last row has what I want
to be the default <input type=submit>. Problem is, when I press
<enter> in any of the text fields, it acts as if the first row's submit
button was pressed.
How can I affect this behaviour if I want to keep the appeareance of
the page? (without scripts), it should also work in most browsers (not
only IE)


Untested: you may try to put the last row with your default button into the
TFOOT element of the table:

<table>
<tfoot>
<tr>...default submit button...</tr>
</tfoot>
<tbody>
...other rows...
</tbody>
</table>

The TFOOT must preceed the TBODY, but is displayed below TBODY - so it may
be exactly what you want (if browsers determine the 'first' submit button
based on the source order).
And this should IMHO even be a semantically correct usage of the TFOOT
element.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Oct 6 '05 #3

Benjamin Niemann wrote:
wo******@gmail.com wrote:
My boss wants me to do some forms without any type of scripts, just
pure HTML/ASP.
I have this table with 3 rows, each row has an <input=text> and ends
with an <input type=submit> buttons, and the last row has what I want
to be the default <input type=submit>. Problem is, when I press
<enter> in any of the text fields, it acts as if the first row's submit
button was pressed.
How can I affect this behaviour if I want to keep the appeareance of
the page? (without scripts), it should also work in most browsers (not
only IE)


Untested: you may try to put the last row with your default button into the
TFOOT element of the table:

<table>
<tfoot>
<tr>...default submit button...</tr>
</tfoot>
<tbody>
...other rows...
</tbody>
</table>

The TFOOT must preceed the TBODY, but is displayed below TBODY - so it may
be exactly what you want (if browsers determine the 'first' submit button
based on the source order).
And this should IMHO even be a semantically correct usage of the TFOOT
element.

OMG, this worked thanks a lot!
The more I learn, the more things I realize I don't know

Oct 7 '05 #4

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

Similar topics

9
by: Wayne | last post by:
Is there a way to stop the default action of a multirow tab control whereby the row with focus moves to the front of the tabs? I find this behaviour annoying and confusing to the user and am at a...
0
by: mat holton | last post by:
Hello, I'm experiencing a really annoying problem with some c# code: I have a number of pages (derived from user control) that change according to the current selection in a treeview (they...
3
by: saato | last post by:
in c# windows application i add buttons(different location and size) on panel.but some buttons disappear.i want to set z-order ascending.like 1st button z-order 1 and next button 2 ....but i cant set...
9
by: Bob Cummings | last post by:
Greetings I have googled this to no avail, maybe someone here can help. I have a user control that has several radio buttons and text boxes. I place 5 of these user controls on a windows form....
1
by: Serdge Kooleman | last post by:
WinForms, how to override/avoide the tab order for a bunch of buttons/textboxes? i have a panel with 4 textboxes (or buttons) in 2 comlumns (so 2 and 2) i would like to scroll in the first...
0
by: Tom Houston via .NET 247 | last post by:
I have built vb.net application that runs on my SBS2003 thatconsists of 20 plus form and menus. I am having problems with aweb form using textboxes. There are also three buttons,back/exit/save. The...
1
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
1
by: Doug | last post by:
Hi I have a datagrid view that I have enabled a use to copy data from. However the copy seems to work in reverse. This results in the last value selected being the first copied to the...
2
by: Doug | last post by:
Hi I have a datagridview in a windows C# application and i am allowing a user to select items from the datagridview. I allow the user to copy the selected items to the clipboard and then if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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
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...
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,...
0
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...

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.