<
script
language
=
'JavaScript'
> function f(){var oWnd=radalert('The record is successfully saved!',300,100,'RecordSaved',null);oWnd.add_close(function () {returnToParent();});Sys.Application.remove_load(f);}; Sys.Application.add_load(f); </
script
>
if(d&&d.tagName.toLowerCase()!="body")
Also, sometimes it throws no error but don't display radalert at all.
These are random errors and do not happen every-time and has not particular pattern of occurrence.
Can anyone please tell me why it happens and how can I fix this. This is a very important part of my project as I use the same script on various pages and get same error on each.
Thanks,
Swati
7 Answers, 1 is accepted
I have same Error. Have you solution? I changed new Telerik version in my project, then had I this problem.
We recently discovered an issue under IE when you try to access the document.activeElement object when your page is loaded in an iframe and you try to access it in the Sys.Application.Load event, which is exactly what seems to be happening here (since you inject it from the server). This seems to be some incorrect browser behavior and there is little we can do to avoid it.
I have one suggestion, though. It is to set an active element beforehand, so that when we try to access it it will provide a valid value. For example this at the end of the form:
function
setSomeFocus()
{
window.document.documentElement.focus();
Sys.Application.remove_load(setSomeFocus);
}
Sys.Application.add_load(setSomeFocus);
I hope this will resolve the situation. If it doesn't I'm afraid I'll need some working code to examine the error and see how to work around it, but this can happen only if I can reproduce it reliably.
Regards,
Marin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Thanks for the information, but I have in javascript the "Sys is undefined" error now. Why wasn't there the "'toLowerCase': object is null or undefined" error in old Telerik version?
Thanks in advance.
@Hasan: This error is a general ASP.NET one and is often caused by a project that is not configured properly. Please examine the following help article for more information on troubleshooting it: http://www.telerik.com/help/aspnet-ajax/introduction-troubleshooting.html. Or you could start from this google search on the matter: http://www.google.com/search?&q=sys+is+undefined.
@Swati: Please try using the RadAlert's callback function instead of adding event handlers dynamically. You can see an example of its usage in this online demo and in the documentation. You could modify the dialog template, but overriding the ok button handler would mean you should first store a reference to the RadAlert in a global variable so you can close() it manually. Alternatively, you could use a normal RadWindow (modal, with limited Behaviors, etc) with the desired layout in its ContentTemplate where you can easily attach JavaScript handlers.
Kind regards,
Marin
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I changed web.config for this error ( "Sys is undefined"). But I take Config Error. I added in web.config this:
<httpHandlers>
<add path="trace.axd" verb="*" type="System.Web.Handlers.TraceHandler" validate="True" />
<add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="*.axd" verb="*" type="System.Web.HttpNotFoundHandler" validate="True" />
</httpHandlers>
I would advise that you start off by examining the following list of help articles that contain useful information on installing the MS AJAX framework and configuring your project for it:
http://www.telerik.com/help/aspnet-ajax/introduction-which-file-do-i-need-to-install.html
http://www.telerik.com/help/aspnet-ajax/introduction-general-aspnetajax-info.html
http://www.telerik.com/help/aspnet-ajax/introduction-adding-radcontrols-prometheus-existing-application.html
http://www.telerik.com/help/aspnet-ajax/introduction-adding-to-app-with-vs.html
Once you have AJAX properly installed you can use our visual studio extensions to create an AJAX-enabled web site that will have the necessary handlers for our controls as well. More information on the VS plugins is available here: http://www.telerik.com/help/aspnet-ajax/introduction-adding-to-app-with-vs.html.
All the best,
Marin
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>