如何使用Silverlight销毁iframe并重定向到上一页 [英] How to destroy iframe and redirect to previous page using silverlight

查看:81
本文介绍了如何使用Silverlight销毁iframe并重定向到上一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在iframe中显示我的RDLC报告.当我将报告下载到客户端时,我希望返回上一页.但是iframe不允许我这样做.
我想关闭iframe中剩余的iframe thourgh html,并希望我的控件进入上一页
但是当我关闭iframe时,它会给我空白页
有人可以帮忙吗?

I am showing my RDLC reports in an iframe . when i download my report to client then i want my previous page back. But iframe is not allowing me to do this.
I want to close iframe thourgh html remaining inside the iframe and want my control to previous page
but iframe is giving me blank page when I am closing it
can anyone help?

"<html>"+
            <head>
            lt;script type="text/javascript">
            function showItem(url) {
            $('#right-pane').load(url);
            }
             function closeIframe()
            { 
              var iframe = parent.document.getElementById('HtmlFrameDiv');
              var iframe2 = parent.document.getElementById('HtmlFrame'); 
                 iframe.parentNode.removeChild(iframe);" 
                iframe.value=null;
                iframe2.value=null;
            } 

            </script>
            </head>


            <a href="java<!-- no -->script: closeIframe()">Close</a> 

            <p>Clicking close will close this window.</p>
            <a           href="parentNode.removeChild(window.parent.document.getElementById('iframeElement'))">Close</a>" +

            </body>
            </html>

推荐答案

('#right-pane').load(url); } 函数closeIframe() { var iframe = parent.document.getElementById('HtmlFrameDiv'); var iframe2 = parent.document.getElementById('HtmlFrame'); iframe.parentNode.removeChild(iframe); iframe.value = null; iframe2.value = null; } < / 脚本 > < /head > < a href java<!-否->脚本:closeIframe( )" < > < p > 单击关闭将关闭此窗口.< /p > < a href =" > 关闭< /a > "+ < /body > < /html >
('#right-pane').load(url); } function closeIframe() { var iframe = parent.document.getElementById('HtmlFrameDiv'); var iframe2 = parent.document.getElementById('HtmlFrame'); iframe.parentNode.removeChild(iframe);" iframe.value=null; iframe2.value=null; } </script> </head> <a href="java<!-- no -->script: closeIframe()">Close</a> <p>Clicking close will close this window.</p> <a href="parentNode.removeChild(window.parent.document.getElementById('iframeElement'))">Close</a>" + </body> </html>


您可以在iframe中使用html上的Hyperlink || Button,该按钮允许通过链接naviagteUrl ||导航到上一页. "onclick" response.redirect("yourpre-page.aspx").
You can use Hyperlink||Button on html remaining inside the iframe, that allow to navigate your previous page by link naviagteUrl || "onclick" response.redirect("yourpre-page.aspx").


您提供的内容对我不起作用
以及在哪里使用response.redirect我正在使用iframe,而在iframe后面我正在使用silverlight
the thing u have provided doesnot work for me
and where to use response.redirect i am doing with iframe and behind iframe i am using silverlight


这篇关于如何使用Silverlight销毁iframe并重定向到上一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆