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

Microsoft JScript runtime error: Object expected

1 Answer 113 Views
Window
This is a migrated thread and some comments may be shown as answers.
eda
Top achievements
Rank 1
eda asked on 19 Aug 2008, 09:33 AM

I have a problem with onclick property when I run my project. After run the project I try to click combobox and then I get an error like this:
Microsoft JScript runtime error: Object expected
I get an error on this row:

<fieldset style="width: 170px;" id="Fieldset3" onclick="return FIELDSET3_onclick()">

I get the same error on onclick property of  radwindowmanager

<telerik:RadWindowManager

id="Odeyen_window"

runat="server" Skin ="Web20"

OnClientPageLoad="CenterAc()" > //I got error on this row

<windows>

<telerik:RadWindow id="PrintWnd"

Modal = "True"

Runat="server"

Skin ="Web20"

NavigateUrl="" Title="">

</telerik:RadWindow>

</windows>

</telerik:RadWindowManager>

And here is my CenterAc function

function GetRadWindow()

{

var oWindow = null;

if (window.radWindow) oWindow = window.radWindow;

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

return oWindow;

}

function

CenterAc()

{

GetRadWindow().Center();

}

please help me to solve this problem

thanks

 

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Aug 2008, 06:20 AM
Hi eda,

OnClientPageLoad accepts only the name of the JavaScript function to be executed - e.g. OnClientPageLoad="CenterAc". The same holds true for all eventhandlers - OnClientShow, OnClientClose, etc. You will also need to use the center() method (note the casing) in order to match the MS AJAX naming convention that RadControls for ASP.NET AJAX use.






Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
eda
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or