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
GeznaAsked:
Who is Participating?
 
pbocanegraCommented:
0
 
irps20001Commented:
Set the "CausesValidation" Property of ImageButton to TRUE. This will work as Default Button/ImageButton

HTH
Rana
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.