Problems replacing an asp button with a RadButton

3 posts, 1 answers
  1. Felice
    Felice avatar
    198 posts
    Member since:
    Aug 2013

    Posted 04 Mar 2014 Link to this post

    I am experiencing problems replacing a simple asp button with a RadButton.
    I need to simply fire a Javascript but it is not working.
    This is the original asp button I need to replace:
    <button style="width: 150px; margin-bottom: 0px;" onclick="openRadWin(); return false;">Exchange rate calculator</button>

    This is the RadButton I am coding to replace the above asp button. 
    <telerik:RadButton ID="Button11" runat="server" Text="" CssClass="cNexchange"
                           HoveredCssClass="cHexchange" PressedCssClass="cCexchange" OnClientClicked="openRadWin(); return false;">
                           <Image EnableImageButton="true" />
    I cannot fire the "openRadWin(); return false,"
    this is the function:
    <script type="text/javascript">
           function openRadWin() {
               var width = "430px";
               var height = "355px";
               var left = "800px";
               var top = "150px";
               radopen("currencies.aspx", "RadWindow1", width, height, left, top);

    What am I doing wrong here?
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Mar 2014 in reply to Felice Link to this post

    Hi Felice,

    Please try the following code snippet which works fine at my end.

    <telerik:RadButton ID="btnBgrImg2" runat="server" ForeColor="Black" CssClass="goButtonClassHov"
        OnClientClicked="openRadWin" AutoPostBack="false" Width="100" Height="95px">
        <Image ImageUrl="../Images/globe.jpg" IsBackgroundImage="true"></Image>

  3. Felice
    Felice avatar
    198 posts
    Member since:
    Aug 2013

    Posted 05 Mar 2014 in reply to Princy Link to this post

    Hi Princy,
    thats perfect. Problem solved. Thank you.

Back to Top