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

Problem with open another web page after close radwindow

1 Answer 86 Views
Window
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 24 Dec 2012, 10:11 AM
hi,
i've a index page with i open a radwindow. Into radwindow load another page that i use to see the messager box. Into this page there's a button that i use to load another web page out this radwindow. With IE 8 and IE 9 all function, with chrome nto function....I post my code.

Index page:
<script type="text/javascript">
// ritorna valore selezionato Anagrafica
function LoadProfilo(sender, eventArgs) {
var arg = eventArgs.get_argument();
if (arg == 1) {
window.location.href("profile.aspx");
}
}
</script>
<telerik:RadWindow ID="RadWindowProfileconfirm" runat="server"
ShowContentDuringLoad="false" Width="435px"
Height="166px" Title="Aggiornamento profilo" Behaviors="None"
MaxHeight="166" MaxWidth="435" Modal="True" Behavior="None"
Font-Names="Verdana" Font-Size="Small" IconUrl="/image/iconlogo.png"
ToolTip="Aggiornamento profilo" OnClientClose="LoadProfilo"
VisibleStatusbar="False" NavigateUrl="register_step2.aspx" Skin="Simple"
ReloadOnShow="True">
</telerik:RadWindow>

code be hinde i use to load this radwindow:

Dim script As String = "function f(){$find(""" + RadWindowProfileconfirm.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)


code radwindow to close the window:

<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
    function Close_and_Load() {
        var arg = new Object();
        arg = 1
        GetRadWindow().close(arg);
    }
</script>

Protected Sub ImgBtncontinua_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgBtncontinua.Click
    ScriptManager.RegisterStartupScript(Page, Me.GetType, "close", "Close_and_Load();", True)
End Sub

please help me




1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 26 Dec 2012, 08:56 AM
Hi Fabio,

The problem is a JavaScript error that prevents your navigation. The window.location.href property is a property, not a function, so the syntax you should use is the following:
if (arg == 1)
{
    window.location.href = "profile.aspx";
}



Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or