accessing window.opener.all from child radwindow

2 posts, 0 answers
  1. Morgan
    Morgan avatar
    4 posts
    Member since:
    Jul 2012

    Posted 14 May 2009 Link to this post

    Hi,

    We are using FileUp ActiveX object to upload the file and want to use RadWindow as Progress window.
    The code to implement the Progress window is as follows:
    Main Page:
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <P><STRONG><FONT color=black size=5>SA-AXFile Multi-File Preset Upload Sample</FONT></STRONG></P>
    <P>
    <SCRIPT>

    function startupload()
    {
        winstyle = "height=300,width=400,status=no,toolbar=no,menubar=no,location=no";
        window.open("AXFFileProgress.htm",null,winstyle);
    }

    </SCRIPT>

    <OBJECT classid=CLSID:230C3D02-DA27-11D2-8612-00A0C93EEA3C id=AXFFile style="LEFT: 0px; TOP: 0px">
    </OBJECT>
    </P>
    <P><INPUT id=button1 name=button1 type=button value="Start Upload" onclick = "startupload()"></P>

    <script language="vbs">
        set xfile = AXFFile.XFrequest
        XFile.Server = "localhost""
        XFile.ObjectName = "/safileupsamples/formresp2.asp"
        AXFFile.AddFile "c:\boot.ini"
        AXFFile.AddFile "c:\autoexec.bat"
    </script>

    </BODY>
    </HTML>

    Progress Page:AXFFileProgress.htm
    <HEAD>
    <SCRIPT language = vbs>
    sub Callback()

    Document.All("AXFFileProgress").XFRequestStream =  Opener.Document.All("AXFFileDownload").XFRequestStream
    Document.All("AXFFileProgress").ShowProgress
    Opener.Document.All("AXFFileDownload").Start
    window.close()
    End sub

    </SCRIPT>
    </HEAD>
    <BODY OnLoad="Callback()">
    <OBJECT ID="AXFFileProgress" CLASSID="CLSID:C3EAF164-E06A-11D2-B5C9-0050041B7FF6"></OBJECT>
    <SCRIPT language = vbs>
    sub AXFFileProgress_TransferComplete()
    MsgBox "Transfer completed"
    end sub
    </SCRIPT>

    I am trying to find out whether I can use opener.document.all and access the AXFFileDownload object on the parent page, if I open the progress window in a Radwindow instead of normal window.open.

    We are trying to work around pop up blocker issues.
    Thanks.
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 18 May 2009 Link to this post

    Hi Morgan,

    You could use RadWindow's client-side API and access the parent page with JavaScript. More information on the subject is available in the documentation:
    http://www.telerik.com/help/aspnet-ajax/window_programmingcallingfunctions.html


    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top