Connecting Tech Pros Worldwide Help | Site Map

Click anywhere on the form a particular button remains selected

Familiar Sight
 
Join Date: Sep 2006
Posts: 142
#1: 4 Weeks Ago
Good day;

When I click anywhere on the form a particular button remains selected & focused.

Even while i'm busy typing in another textbox the button looks as if it's being selected with a dark border around it.

Please help on not alowing the button to have the focused / selected when clicking anywhere.

I'm coding in xslt file which has no form where i can find an onload event & the button gets generetad.

Please Assist!
Familiar Sight
 
Join Date: Sep 2006
Posts: 142
#2: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Any ideas p please help??
RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 348
#3: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Hi ismailc,

The submit button doesn't receive focus. Browsers highlight the submit button in a form that gets "clicked" automatically when you press ENTER in a text field for instance, when the form is submitted by a user action other than clicking the submit button. It's a visual way of telling the user what the form's default action is. Replace those submit buttons to normal buttons and submit the form via javascript. That will solve the problem. Or in the submit buttom onfocus="this.blur();". I havent tried this but it may help you...

Thanks and Regards
Ramanan Kalirajan
Familiar Sight
 
Join Date: Sep 2006
Posts: 142
#4: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Works thank You

changed from submit buttons to normal buttons..

great :)
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#5: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Quote:

Originally Posted by RamananKalirajan View Post

Replace those submit buttons to normal buttons and submit the form via javascript.

the drawback of that is, that the form becomes unuseable if Javascript is disabled.
Familiar Sight
 
Join Date: Sep 2006
Posts: 142
#6: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


i got it going, changed from submit buttons to normal buttons

Thank you
RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 348
#7: 4 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Glad to see you got it working. Keep posted if you have any issue. Keep Moving Forward.

Thanks and Regards
Ramanan Kalirajan
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#8: 3 Weeks Ago

re: Click anywhere on the form a particular button remains selected


Quote:

Originally Posted by Dormilich View Post

the drawback of that is, that the form becomes unuseable if Javascript is disabled.

The solution would be to have the submit buttons displayed by default and replace them with buttons using JavaScript.
Reply