This is a migrated thread and some comments may be shown as answers.
Undefined Jscript error with WIndow close event
3 Answers 43 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mahesh
Top achievements
Rank 1
Mahesh asked on 13 Apr 2012, 02:01 PM
Hi,
I developed a telerik mvc window in the same way in which the demo application was rpovided and also working fine in Mozilla Firefox But when i amtrying to run the same in IE9 it getting error in  the following line
$("#WIndow").data("tWindow").close(). and the error was

Microsoft JScript runtime error: Unable to get value of the property 'close': object is null or undefined.
How can I solve this problem?

Regards
Mahesh

3 Answers, 1 is accepted

Sort by
0
Swapnadip
Top achievements
Rank 1
answered on 04 May 2012, 02:04 PM
Hi Telerik,
   I also have the same question
0
Milos
Top achievements
Rank 1
answered on 02 Jul 2012, 06:59 PM
I'm also encountering this issue with my application.  It only happens in Internet Explorer.  I've already tried looking at the duplicate jQuery reference problem described here: http://www.telerik.com/community/forums/aspnet-mvc/window/empty-data-twindow.aspx.

I have this same window working correctly on other pages when opened from a telerik menu, however, when I attempt to get it working from a telerik grid toolbar button, I get the error described.  I'm not certain if this is coincidence or if there is something else on the page causing this behavior.
0
Milos
Top achievements
Rank 1
answered on 02 Jul 2012, 08:02 PM
An update to what was causing this issue for me.  I actually found 2 different causes each being on different pages.  My window is contained in a partial view that is reused on many pages.

  1. My window contained a form in it.  A page that was using this window also had a form and was rendering the window inside the main page's form (form within a form).  It didn't like this.  I was able to remove the main page's form as it was not needed in the first place.
  2. One page was rendering the partial view which contained the Telerik window twice on the same page.  This obviously won't work since it would render invalid markup (same ID for 2 different DOM elements).

Hope this helps someone head down the right path to troubleshoot the issue.

Tags
Window
Asked by
Mahesh
Top achievements
Rank 1
Answers by
Swapnadip
Top achievements
Rank 1
Milos
Top achievements
Rank 1
Share this question
or