This question is locked. New answers and comments are not allowed.
good day.
This is my problem:
this and some other client code linked to page from file with this line:
in my page I have:
in <head>, and
it's works in test project, BUT:
if I call JS method showMessage('111') then take a error message in browser's debugger
it's like some mysticism, because if I call
everything if fine and works correct.
Any Ideas?
ps: sorry for my english.
This is my problem:
function showMessage(messgae) { var window = $("#MyWindow").data("tWindow"); window.title("error message (bla-bla-bla)"); window.content(messgae); window.center(); window.open(); return;}<script src="<%: Url.Content("~/Scripts/script.js") %>" type="text/javascript" ></script>in my page I have:
<%: Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.Office2010silver.css").Combined(true).Compress(true)) %><% Html.Telerik().Window() .Name("TTTWindow") .Height(200) .Width(500) .Buttons(buttons => buttons .Close()) .Draggable(true) .Visible(true) .Render();%><%: Html.Telerik().ScriptRegistrar() .DefaultGroup(group => group.Combined(true) .Add("telerik.common.js") .Add("telerik.draganddrop.js") .Add("telerik.window.js") .Compress(true))%>it's works in test project, BUT:
if I call JS method showMessage('111') then take a error message in browser's debugger
Uncaught TypeError: Cannot call method 'title' of undefinedit's like some mysticism, because if I call
setTimeout(function () { showMessage(userMessage) }, 1);Any Ideas?
ps: sorry for my english.