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

Date

3 Answers 136 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mayur Shah
Top achievements
Rank 1
Mayur Shah asked on 18 Jan 2011, 07:53 AM

java script error is coming when we are using Telerik Calendar control in a page, and if we use SetFocusOnError="true"

Property.
Moreover we have used the ajax validator extender.
Please refer attachment.
can anyone have idea about any possible solutions?

 

3 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 18 Jan 2011, 10:32 AM
Hello Rikin,

This error can occur if you are using an older version of our controls in .Net 4.0. Please ensure you have updated to our latest release and let us know if you find any problems. You can read the following article for more details on how to upgrade:
http://www.telerik.com/support/kb/aspnet-ajax/general/updating-radcontrols-for-asp-net-to-another-version-or-license.aspx

Best wishes,
Pavel
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.
0
Mayur Shah
Top achievements
Rank 1
answered on 19 Jan 2011, 05:57 AM
Thanks for your reply.
Is there any other alternate/option to solve the issue? 
waiting for the positive response.
0
Pavel
Telerik team
answered on 19 Jan 2011, 08:36 AM
Hi Rikin,

You can add the following script to the body tag of the affected page:
<script type="text/javascript">
        if (typeof (ValidatedControlOnBlur) == "function") {
            ValidatedControlOnBlur = function (event) {
                event = event || window.event;
                var control;
                if ((typeof (event.srcElement) != "undefined") && (event.srcElement != null)) {
                    control = event.srcElement;
                }
                else {
                    control = event.target;
                }
 
                var isRadInputControl = false;
                if ((control.style)
            && (typeof (control.style.visibility) != "undefined")
            && (control.style.visibility == "hidden")
            && (typeof (control.style.width) != "undefined")
            && (document.getElementById(control.id + "_text") || document.getElementById(control.id + "_dateInput_text"))
            && (control.tagName.toLowerCase() == "input" || control.tagName.toLowerCase() == "textarea")) {
                    isRadInputControl = true;
                }
 
                if ((typeof (control) != "undefined") &&
            (control != null) &&
            (Page_InvalidControlToBeFocused == control)
        ) {
                    if (isRadInputControl && document.getElementById(control.id + "_text")) {
                        document.getElementById(control.id + "_text").focus();
                    }
                    else if (isRadInputControl && document.getElementById(control.id + "_dateInput_text")) {
                        document.getElementById(control.id + "_dateInput_text").focus();
                    }
                    else {
                        control.focus();
                    }
 
                    Page_InvalidControlToBeFocused = null;
                }
            }
        }
 
    </script>

Hope this helps.

Kind regards,
Pavel
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.
Tags
General Discussions
Asked by
Mayur Shah
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Mayur Shah
Top achievements
Rank 1
Share this question
or