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

RadWindow - issue in IE8

3 Answers 31 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 28 Jan 2014, 05:58 PM
I have a page that opens a Radwindow as a popup confirm window before deleting an item. Only on IE8, the confirmation doesn't work. It keeps looping - you click confirm, the radwindow shows again, you click confirm again, the radwindow shows again....

On IE debugger, I get the script error "Object doesn't support property or method 'createEvent' ". I am not sure where this is getting fired off. Is there a way to fix this? Please let me know if you need any other information from me. 

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Jan 2014, 11:47 AM
Hi Jay,

Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end.

ASPX:
<telerik:RadWindow ID="confirmWindow" runat="server" VisibleTitlebar="false"                  VisibleStatusbar="false" Modal="true" Behaviors="None" Height="150px" Width="300px"  VisibleOnPageLoad="true">
    <ContentTemplate>
        <div style="margin-top: 30px; float: left;">
            <div style="width: 60px; padding-left: 15px; float: left;">
            </div>
            <div style="width: 200px; float: left;">
                <asp:Label ID="lblConfirm" Font-Size="14px" Text="Are you sure you want to                                    submit the page?"
                    runat="server"></asp:Label>
                <br />
                <br />
                <telerik:RadButton ID="btnYes" runat="server" Text="Yes"                                                AutoPostBack="false" OnClientClicked="YesOrNoClicked">
                </telerik:RadButton>
                <telerik:RadButton ID="btnNo" runat="server" Text="No" AutoPostBack="false"                              OnClientClicked="YesOrNoClicked">
                </telerik:RadButton>
            </div>
        </div>
    </ContentTemplate>
</telerik:RadWindow>

JavaScript:
<script type="text/javascript">
    function YesOrNoClicked(sender, args) {
        var oWnd = $find("<%=confirmWindow.ClientID %>");
        oWnd.close();
        if (sender.get_text() == "Yes")
            alert("Submitted");
        else
            alert("Cancelled");
    }
</script>

Please provide your full code if it doesn't help.
Thanks,
Princy.
0
Jay
Top achievements
Rank 1
answered on 29 Jan 2014, 03:07 PM
Here is my code for your review. Please let me know if you see any issue with it. FYI, it works fine on all browsers and versions except IE8.

This is the JS function that is called on btnDelete: 

function BeforeDeleteValidations() {var grid = document.getElementById('GvVersionHist'); // grid1 is the id of the componentart grid
var checkedItems = GetGridColumnIds(grid);if (checkedItems == "") {
DisplayErrorMsg(GetTextMessage(30002));
return false;
}
if (document.getElementById("hndCurrentTab") != undefined) {
if (confirm("Selected record(s) in Version History will be deleted.")) {
document.getElementById("hndcheckedItems").value = checkedItems;
return true;
}
} else {
document.getElementById("hndcheckedItems").value = checkedItems;
var sHeader = "";
var stitle = encodeURIComponent(GetTextMessage(62020));
var sMessage = encodeURIComponent(GetTextMessage(30003));
var deleteText = GetTextMessage(62026);
var sPage = "../reuse/ConfirmMessage.aspx?Header=" + sHeader + "&PageTitle=" + stitle + "&Message=" + sMessage + "&ButtonText=" + deleteText + "&CancelText=" + GetTextMessage(50004);
OpenRadWindowView(sPage, 220, 620);
return false;
}
}




The btnDelete button calls a JS function BeforeDeleteValidations(), which opens a aspx page as a confirm window using Telerik Radwindow control. I am not even sure where exactly this error is firing from, but the IE debugger says its on the aspx page that opens as a confirm window. I have pasted the code from that page here. Let me know if there is anything wrong here.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ConfirmMessage.aspx.vb" Inherits="Properties_ConfirmMessage" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %><%@ Register Src="RadwinHeader.ascx" TagName="Reuse_Header" TagPrefix="ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<ascx:Reuse_Header ID="Reuse_Header1" runat="server" />
<script type="text/javascript">

function CloseWin() {
var oWindow = GetRadWindowObj();
oWindow.Close();
}
function ConfirmClick() { 
parent.CallOperations();
CloseWin();
}

</script>


<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<!-- Modal Window Start here -->
<div>
<!-- Window Title -->

<!-- end title -->
<div class="content-window gray">

<div class="displaymsg trans">
<b class="icon32 link-lock"></b> 
<div class="left">
<h1><asp:Label id="lblHeader" Text="This link will be locked immediately" 
runat="server" meta:resourcekey="lblHeaderResource1" /> </h1> 
<p>
<asp:Label id="lblMessage" 
Text="<strong>Your file will not be affected</strong>, but users will no longer be able to access the linked file(s). <strong>Are you sure you want to lock this link?</strong>" 
runat="server" meta:resourcekey="lblMessageResource1" />
</p>

</div>
</div>
</div>
<div class="btns-window gray bottom">
<div class="btns-right">
<asp:Button Text="Lock" id="btnConfirm" runat="server" 
OnClientClick="return ConfirmClick();" class="submit primary" 
meta:resourcekey="btnConfirmResource1" /> 

<asp:Button id="btnCancel" runat="server" OnClientClick="CloseWin();" 
class="submit" meta:resourcekey="btnCancelResource1" /> 
</div>
</div>
</div>
</div>

</form>
<!-- GoogleAnalytics Footer JS --> 
<script type="text/javascript" language="JavaScript" src="../JS/gaFoot.js"></script>
</body>
</html>
0
Marin Bratanov
Telerik team
answered on 31 Jan 2014, 11:59 AM
Hi Jay,

I also tried this and it seems to work fine for me. You can find attached my sample and a video from my test.

At this point I can advise the following:
- examine the stack trace of the error to see where it originates, so you can resolve its root cause
- see if it stems from the Telerik controls for from the other controls on the page
- try removing the other controls to see if this helps
- if the issue is gone - either migrate to using only Telerik controls, or contact their vendor for assistance


Regards,
Marin Bratanov
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Window
Asked by
Jay
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jay
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or