OnClientClicked issue

2 posts, 0 answers
  1. Stig
    Stig avatar
    8 posts
    Member since:
    Jul 2012

    Posted 08 Feb Link to this post

    Hi

     

    I have a small issue, that i cant seem to get my head around...

     

    i have a radbutton - with an OnClientClicked="doSomething" attached:

    <telerik:RadButton ID="ipplanSearch" runat="server" ButtonType="LinkButton" CssClass="imageButton_75" Text="Search" OnClientClicked="IPPlanSearchButtonClick" AutoPostBack="false" >
                            <Icon PrimaryIconUrl="Images/Find_16x16.png" />
                        </telerik:RadButton>

     

    and the i have a javascript function as this:

    function IPPlanSearchButtonClick(sender, eventArgs) {

     

        var Hostname = $find("<%= Hostname.ClientID %>")._text;
        var func = $find("<%= Func.ClientID%>")._text;
        var ApplicationID = $find("<%= ApplicationId.ClientID%>")._text;
        var IPAddress = $find("<%= IPAddress.ClientID%>")._text;
        var Terminated = $find("<%= Terminated.ClientID%>")._selectedValue;
        var url = "/Windows/IPPlanSearch.aspx?hostname=" + Hostname + "&function=" + func + "&EnvironmentID=&Application=" + ApplicationID + "&IPAddress=" + IPAddress + "&MACAddress=&AssignedIP=&ManagementIP=&CountryID=&SerialNumber=&Asset=&OSName=&DateID=&CertificateName=&Terminated=" + Terminated;
     
        OpenWindowV1(url, "Search IPPlan");
        return false;
    }

     

    Everything seems to be working just fine - the function is called as expected, the new window is opened.. but then it complains:

     

    0x800a1391 - JavaScript runtime error: 'IPPlanSearchButtonClick' is undefined

     

    from the following autogenerated function:

     

    Sys.Application.add_init(function() {
        $create(Telerik.Web.UI.RadButton, {"_accessKey":"","_hasIcon":true,"_hasImage":false,"_isClientSubmit":true,"_isImageButton":false,"_postBackReference":"__doPostBack('ipplanSearch','')","_renderMode":1,"autoPostBack":false,"buttonType":1,"clientStateFieldID":"ipplanSearch_ClientState","cssClass":"imageButton_75","iconData":{"primaryIconUrl":"/Images/Find_16x16.png"},"imageData":{},"text":"Search","toggleStatesData":[],"uniqueGroupName":"","uniqueID":"ipplanSearch"}, {"clicked":IPPlanSearchButtonClick}, null, $get("ipplanSearch"));
    });

     

    Any idea what i have missed?

    thanks

    /Stig

     

     

  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1494 posts

    Posted 11 Feb Link to this post

    Hello Stig,

    The provided information is not enough to determine the cause of the issue. Does upgrading to the latest Telerik UI version - 2016.1.113 help? If not it would be better to open a support ticket and provide us with a runnable sample that reproduces the issue.

    Regards,
    Danail Vasilev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top