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

Access is denied javascript error

1 Answer 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 20 Aug 2008, 12:02 AM

Hi all,

We have a Radgrid in a web page on Server A that is used inside a web app in an iframe on server B.  Basically this means it’s in a different domain and access to parent objects is not allowed.
 

When the mouse moves over the grid a javascript error “Access is denied” appears because of “top.document”.  Full details are: 

ScriptResource.axd - line 5959 

var offsetL = w.screenLeft - top.screenLeft - top.document.documentElement.scrollLeft + 2; 

Is there some way that we can configure the control to not have this issue?  Can we have exception handling placed into the javascript? 

ASPX Layout is defined below

 <telerik:RadGrid ID="rgLog" runat="server" AutoGenerateColumns="False" GridLines="None"    OnItemDataBound="rgLog_ItemDataBound" OnNeedDataSource="rgLog_NeedDataSource" Width="100%" OnDetailTableDataBind="rgLog_DetailTableDataBind" Skin="Outlook" ShowHeader="False">
    <MasterTableView>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px" />
        </ExpandCollapseColumn>
    </MasterTableView>
</telerik:RadGrid>

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 20 Aug 2008, 06:45 AM
Hello Vincent,

Unfortunately the "Access is denied" cross-domain error is well known in ASP.NET AJAX world. You can either apply the fix described in details in this blog post or just switch to ASP.NET 3.5.

All the best,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Vincent
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or