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

Not work oWnd.get_contentFrame().contentWindow.CalledFn();

4 Answers 153 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sari
Top achievements
Rank 1
Sari asked on 05 Oct 2010, 07:24 AM

Hello.

I it is necessary from Default.aspx to cause function in open window RadWindow. Function cause when window is loaded,

Default.spx  javascript code:

var oWnd = GetRadWindowManager().getWindowByName( "RadWindow1");

oWnd.get_contentFrame().contentWindow.CalledFn();

Radwindow  javascript code:

function calledFn()
{
  alert("ok");  
}

Error:Mistake of the execution Microsoft JScript: Object does not support this characteristic or method

That wrong?

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Oct 2010, 02:05 PM
Hello Sari,


From your code I can see that your function name is not unique. Since javascript is case sensitive, you need to make sure that you are using the exact name for the function.

Default.aspx  javascript code:

         var oWnd = GetRadWindowManager().getWindowByName( "RadWindow1");

         oWnd.get_contentFrame().contentWindow.calledFn();

Radwindow  javascript code:

       function calledFn()
       {
              alert("ok");  
       }



Regards,
Shinu.
0
Sari
Top achievements
Rank 1
answered on 06 Oct 2010, 05:45 AM
Has Changed the name to functions on unique but this nothing do not give.
0
Georgi Tunev
Telerik team
answered on 07 Oct 2010, 01:48 PM
Hi Sari,

If the functions are named correctly and there is only one RadWindowManager on the page, this code should work. For convenience I attached a small sample based on your code - I hope it helps.


Best wishes,
Georgi Tunev
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
0
Sari
Top achievements
Rank 1
answered on 08 Oct 2010, 06:46 AM
Thank you.
Work. It was in my carelessness. In Radwindow function was сalledFn(), and Default.aspx CalledFn(). Mainly I write to Vb.Net, but VB.Net is case insensitive. Therefore missed the error. While in the message posted on the forum, both functions are spelled correctly.I saw an error when I started to compare my code with your example.
Tags
Window
Asked by
Sari
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Sari
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or