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

[Solved] JS error using the window with Visibility = False

1 Answer 24 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steve
Top achievements
Rank 1
Steve asked on 06 Jan 2011, 10:34 AM
I am using the Window and trying to load the page with the Visible(False) and show the window from my own code.

When I call tWindow.open() I get an error in jquery-1.4.3.min.js.

Note: I am using MVC 3 with Razor view engine.

Declaring window....
@Html.Telerik().Window().Name("EditTextWindow").Visible(false).Scrollable(false).Draggable(true).Width(400).Buttons(b => b.Maximize().Close()).Content("<input type=\"text\" id=\"textEditBox\" value=\"\" /><br/><input type='button'  id='textEditBox' value='OK' />").Title("Edit Text").Modal(true)

Calling open from within a JS event handler...
$(".canedit").click(function () {
    var win = $("#EditTextWindow").data("tWindow");
    win.open();
});

throws an error on win.open() (win is not null). (line 155)
Message is "Invalid Argument"
a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit


1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 06 Jan 2011, 11:02 AM
Hi Steve,

I guess we fixed that since the release. I'm attaching the modified telerik.window.min.js.

Regards,
Alex Gyoshev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Steve
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or