This is a migrated thread and some comments may be shown as answers.

Can't set focus on a Radbutton Imagetype

1 Answer 121 Views
Button
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 07 Mar 2011, 08:11 PM
hello there:

I Replace standard asp.net buttons for radbuttons on my website and some focus client scripts stopped working due button type has changed. Dou you know how to set focus on Image type Radbuttons. Because I'm using some radcomboboxes linked to autocomplete text property and I set up a script focusing a button on the RadComboBox client events  "onclientdropdownclosing" and "onclientdropdownclosed".

this is my current focus client event used on RadcomboBoxes:

 function setFocusTobtnBuscaCliente() {
                   document.Form1.btnBuscaCliente.focus();
               }


Thanks in advance for any help provided!!!

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Mar 2011, 05:56 AM
Hello Luis,

RadButton creates a client-side object with the ClientID of the button. You can obtain the reference using the $find and then can set the focus as shown below.

Javascript:
function setFocusTobtnBuscaCliente()//calls on OnClientDropDownClosing
   {
       var btn = $find('<%=RadButton1.ClientID%>');
       btn.focus();//setting focus
   }

Thanks,
Shinu.
Tags
Button
Asked by
Luis
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or