Edit User Profile - Make SAVE default
Brought to you by:
friedj
When editing a user profile, the current default
button on the form is CANCEL.
Since the data is error checked on submission, could
you make the SAVE button the default.
While setting up a large number of users for a new
project, I found myself constantly hitting the ENTER
key which cancels the request rather than saving it.
Logged In: YES
user_id=364010
I need some advice on how to do this across different
browsers or at least for one browser family. I might
check if I find out myself, but if I shouldn't be
successful I might close this request.
Logged In: YES
user_id=138321
Sorry to be so long responding to the comment. We have
stopped using trackit because the implementation project we
were using it for completed.
I have not examined the source code for the dynamic HTML
(jsp) page so I am not sure what type of HTML control is
used to submit or cancel the form. I suspect you are using
the <button> although an <input type="submit" ...> is also
possible of course.
Regardless of which HTML control you are using there is an
attribute tabindex which can be set to establish the order in
which all form controls are presented for user interaction.
The lowest number (1 based) will first receive focus, 2 is
second, etc ....
The tabindex attribute is available to all controls of a form
and is not browser dependant. There is an additional
taborder attribute but it seems to be proprietary to Microsoft
IE.
It seems to me that if you insert the attribute tabindex="1"
within the save button HTML control <button
tabindex="1" ....> or <input type="submit" tabindex="1" ....>
you would be able to identify that button as the one to be
considered as clicked if a browser user hits the enter/return
key instead of mouse clicking a specific button.