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

Can't get any events to work (client or server)

2 Answers 58 Views
Button
This is a migrated thread and some comments may be shown as answers.
Scott R
Top achievements
Rank 1
Scott R asked on 03 Dec 2010, 07:26 AM
Sorry if I've missed something obvious, but this seems like it should be very simple. I just want to have an image button that executes some javascript when I click it.

function FBLogin(sender, args) {
    FB.login(fb_loggedin, { perms: 'email,publish_stream,offline_access' });
}

<telerik:RadButton ID="RadButton1" runat="server" Text="Login" Height="55px" Width="225px" AutoPostBack="false" OnClientClicked="FBLogin">
        <Image ImageUrl="~/Images/fb_btn.png" />
</telerik:RadButton>

Absolutely nothing happens when I click the button. If I make the image a "background" image and add some text then it works, but only if I click on the text. As you can see the button is quite large and the user should be able to click anywhere on the button, not just on the text. Also, I really don't want text (the image already has the text on it).

2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 07 Dec 2010, 10:42 AM
Hello Scott,

I suspect that some JavaScript error is causing the client events to not fire correctly. Could you please enable script debugging in IE or install FireBug in FF to see if JS error is thrown? I tried to reproduce locally, but to no avail. Please find my test project attached to the thread.

All the best,
Pero
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Scott R
Top achievements
Rank 1
answered on 07 Dec 2010, 05:19 PM
Thanks for the reply and for checking into this, Pero. I ended up just using a regular ImageButton and everything works fine.
Tags
Button
Asked by
Scott R
Top achievements
Rank 1
Answers by
Pero
Telerik team
Scott R
Top achievements
Rank 1
Share this question
or