如何在jquery对话框中打开外部aspx页面 [英] how to open external aspx page in jquery dialogue box

查看:77
本文介绍了如何在jquery对话框中打开外部aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个accordion.aspx页面,我需要在jquery对话框中使用javascript函数打开,同时只要对话框打开就使得调用页面无法访问。



试用我的代码如下:



i have a accordion.aspx page which i need to open in jquery dialog using javascript function at the same time making the calling page inaccessible as long as dialog is open.

for try outs my code is as follows :

<head>
    <title></title>




<script type="text/javascript" src="Scripts/jquery-1.7.1.js"></script>
        <script type="text/javascript" src="Scripts/jquery-ui-1.8.20.js"></script>
        <script type="text/javascript">
            function Load()
            {
                $('#someDiv').load("WebForm1.aspx").dialog('open').dialog(
                    {
                        autoOpen: true,
                        position: 'center',
                        draggable: false,
                        width: 300,
                        height: 40,
                        resizable: false,
                        modal: true,
                    });
            }
        </script>




</head>
    <body  önload="Load();">
        <div id="someDiv"></div>
        <button id="btn1">Click me</button>
    </body>
    </html>





js的功能加载是一样的。

但问题是我仍然可以访问调用页面,即我仍然可以点击btn1我需要避免这种情况。还有一个链接关闭按钮,它会自动出现并关闭对话框。我也需要避免这种情况。



有人可以帮忙吗?



提前致谢。



js function load will be same.
but the problem is I can still access the calling page i.e I can still click on btn1 I need to avoid this. Also there is an link "close" button which automatically is appearing and closes the dialog. I need to avoid this too.

Can anyone please help?

Thanks in advance.

推荐答案

' #someDiv')。 load( WebForm1.aspx)。dialog(' 打开')。对话框(
{
autoOpen: true
位置:' center'
draggable: false
width: 300
height: 40
可调整大小: false
modal: true
});
}
< / script>
('#someDiv').load("WebForm1.aspx").dialog('open').dialog( { autoOpen: true, position: 'center', draggable: false, width: 300, height: 40, resizable: false, modal: true, }); } </script>




</head>
    <body  önload="Load();">
        <div id="someDiv"></div>
        <button id="btn1">Click me</button>
    </body>
    </html>





js的功能加载是一样的。

但问题是我仍然可以访问调用页面,即我仍然可以点击btn1我需要避免这种情况。还有一个链接关闭按钮,它会自动出现并关闭对话框。我也需要避免这种情况。



有人可以帮忙吗?



提前致谢。



js function load will be same.
but the problem is I can still access the calling page i.e I can still click on btn1 I need to avoid this. Also there is an link "close" button which automatically is appearing and closes the dialog. I need to avoid this too.

Can anyone please help?

Thanks in advance.


没有外部aspx页面这样的东西。通常,ASPX页面不存在于客户端大小上,它们仅存在于服务器端的代码中,并且响应于HTTP请求而转换为某些资源(HTTP或其他任何内容)。这个问题根本不正确;您首先需要了解Web,HTTP和ASP.NET的工作原理。



-SA
There is no such thing as "external aspx page". Generally, ASPX pages do not exist on client size, they only exist in code on the server side and are transformed to some resources (HTTP or anything else) in response to HTTP request. The question is simply incorrect; you need first learn how Web, HTTP and ASP.NET work.

—SA


这篇关于如何在jquery对话框中打开外部aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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