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

Problems replacing an asp button with a RadButton

2 Answers 80 Views
Button
This is a migrated thread and some comments may be shown as answers.
Felice
Top achievements
Rank 1
Felice asked on 04 Mar 2014, 09:00 PM
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" />
                   </telerik:RadButton>
I cannot fire the "openRadWin(); return false,"
this is the function:
<script type="text/javascript">
       //<![CDATA[
       function openRadWin() {
           var width = "430px";
           var height = "355px";
           var left = "800px";
           var top = "150px";
           radopen("currencies.aspx", "RadWindow1", width, height, left, top);
       }
       //]]>
   </script>

What am I doing wrong here?

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 05 Mar 2014, 03:51 AM
Hi Felice,

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

ASPX:
<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>
</telerik:RadButton>

Thanks,
Princy.
0
Felice
Top achievements
Rank 1
answered on 05 Mar 2014, 06:55 AM
Hi Princy,
thats perfect. Problem solved. Thank you.

Felice
Tags
Button
Asked by
Felice
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Felice
Top achievements
Rank 1
Share this question
or