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

Redirects Works in IE, but not in Firefox and other browsers

1 Answer 34 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
J.F. Tournier
Top achievements
Rank 1
J.F. Tournier asked on 11 Mar 2010, 08:43 PM
I've created a function in C# thats results in a Redirect. See below. This function is called by a certain button on my page.
When using this in IE it works like a charm. But, using it in Firefox or other browsers it results in an error telling me that "window.parent.navigate" is not a function.

Any Ideas how i can fix this problem?

        private void Redirect(string captureType)
        {
            Telerik.Web.UI.RadAjaxManager mngr = (Telerik.Web.UI.RadAjaxManager)this.Page.Master.FindControl("RadAjaxManager");
            if (mngr != null)
            {
                mngr.ResponseScripts.Add(string.Format("window.parent.navigate('Capture.aspx?CaptureType={0}');", captureType));
            }
            else
            {
                throw new Exception("RadAjaxManager required on masterpage.");
            }
        }

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 16 Mar 2010, 07:35 AM
Hello J.F. Tournier,

If you check the documentation for that method, you will see the quite common:
There is no public standard that applies to this method. This means that it's a non-standard feature and most likely it only works in Internet Explorer.

Instead you can use window.location.href='http://www.google.com';

All the best,
Nikolay
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.
Tags
Ajax
Asked by
J.F. Tournier
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or