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

OnClientClicked issue

1 Answer 87 Views
Button
This is a migrated thread and some comments may be shown as answers.
Stig
Top achievements
Rank 1
Stig asked on 08 Feb 2016, 01:18 PM

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

 

 

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 11 Feb 2016, 10:50 AM
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
Tags
Button
Asked by
Stig
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or