Link to home
Start Free TrialLog in
Avatar of Gezna
Gezna

asked on

set focus to imagebutton / linkbutton

Hi ,

I was using javascript to set the focus of buttons on my page. It works fine, until I try it with linkbuttons and image buttons.

both document.forms(0).ctrlName.focus; and getelementbyid(ctrlName).focus work, but just not with imagebuttons or linkbuttons.

I know in 2.0, there is now a default button setting in the form, but that won't help me here.

Any ideas? thanks
ASKER CERTIFIED SOLUTION
Avatar of pbocanegra
pbocanegra

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Set the "CausesValidation" Property of ImageButton to TRUE. This will work as Default Button/ImageButton

HTH
Rana