This question is locked. New answers and comments are not allowed.
Hi,
This should be a simple thing to do but I'm obviously missing something obvious. I am pretty new to MVC and this particular Telerik product so please bear with me.
I am trying to display a modal login dialog when the user clicks on a login button. This is my current code:
When I click on the button I get a JavaScript error claiming that the object is null or undefined. Using the debugger I can find an object with the jQuery $("#LoginWindow") but the data method returns no data. Any ideas on what could be causing this? If I set Visible to true the window displays as I would expect it to..
This should be a simple thing to do but I'm obviously missing something obvious. I am pretty new to MVC and this particular Telerik product so please bear with me.
I am trying to display a modal login dialog when the user clicks on a login button. This is my current code:
@{
Html.Telerik().Window()
.Name("LoginWindow")
.LoadContentFrom("Index", "Login")
.Visible(false)
.Title("Log In")
.Buttons(buttons => buttons.Close())
.Width(600)
.Render();
}
function
showLogin()
{
var
window = $(
"#LoginWindow"
).data(
"tWindow"
);
window.open();
}
When I click on the button I get a JavaScript error claiming that the object is null or undefined. Using the debugger I can find an object with the jQuery $("#LoginWindow") but the data method returns no data. Any ideas on what could be causing this? If I set Visible to true the window displays as I would expect it to..