Below code is placed in page designer (page level).
<
telerik:RadScriptBlock runat="server" ID="RadScriptBlock2">
function
openFormReserve() {
var dock = $find("<%= RadDock3.ClientID %>");
// Center the RadDock on the screen
var viewPort = $telerik.getViewPortSize();
var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
$telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });
dock.set_closed(
false);
//var descriptionTextBox = $get('<%= ComboFacility.ClientID %>');
Sys.Application.remove_load(openFormReserve);
}
</telerik:RadScriptBlock>
If I placed this javascript function in Javascript file (Sample.js) and assing link to this js file.
During executing script, the first line of javascript function get the null value.
var dock = $find("<%= RadDock3.ClientID %>");
Main reason is I do not want to place this javascript function at page level, and placing it js file. then How can i get the radcontrol object in javascript function.
Please do provide small sample example.
Thanks and Regards