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

RadWindow e is undefined error after RegisterStartupScript

0 Answers 77 Views
Window
This is a migrated thread and some comments may be shown as answers.
mc2000
Top achievements
Rank 1
mc2000 asked on 08 Nov 2010, 06:15 PM
I also opened a case on this but feel others might either (a) have insights or (b) get value out of the response. Thanks!
*************
I have a radwindow:
<telerik:RadWindow ID="StudentCheckListWindow" runat="server" Modal="True" AutoSize="true" EnableShadow="true"
  
Behaviors="Close" ReloadOnShow="true">

With a user control inside. The user control has a radgrid which lists a series of links. When one of the links is clicked it does a response.redirect to redirect the page.

During testing, I enabled IE script debugging and I am getting the attached error (saying e is undefined). I have tracked it down to the following scenario.

  1. Page opens with RadWindow hidden
  2. User clicks on a link which calls some JavaScript using RegsiterStartupScript (see below)
  3. User then opens the RadWindow via oWnd.Show() syntax and RadWindow opens
  4. Item is clicked and response.redirect is called. JavaScript error (attached) is thrown. Page DOES redirect fine.

If the item is clicked in the RadWindow before any RegisterStartupScript is called everything is fine. Also, if I run something RegisterStartupScript and then do a full page postback and then open the window everything is fine. It's almost like RegisterStartupScript is changing the page DOM and then the RadWindow is throwing an error which is fixed by a full postback.

My code block looks something like:

ScriptManager.RegisterStartupScript(Page, this.GetType(), "RedirectScript", "window.open('" + redirect + "');", true);

Thanks in advance!

No answers yet. Maybe you can help?

Tags
Window
Asked by
mc2000
Top achievements
Rank 1
Share this question
or