使用Jquery打开页面作为对话框窗口 [英] Open a page as dialog window using Jquery
本文介绍了使用Jquery打开页面作为对话框窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好专家,
以下是我的内容
Search.aspx是一个网页表格,其中包含以下代码
< 表格 id = form1 runat = < span class =code-keyword> server >
< ; div id < span class =code-keyword> = NewTireSearch align = center >
< asp:UpdatePanel ID = uplNS runat = server UpdateMode = 条件 ChildrenAsTriggers = true >
< ContentTemplate >
< p >
< 选择 id = 制造商 名称 = 制造商 < asp:Literal ID =' litManfDis' runat =' 服务器 / >
< 选项 > SELECT MANUFACTURER < / option >
< asp:Literal ID = litManf runat = server / >
< / select >
< / p >
< p >
< select id = ConCom name = Consumer-Commercial < asp:Literal ID =' litConcomDis' runat =' server' < span class =code-attribute> / >
< 选项 > 消费者/商业< / option >
< asp:Literal ID = litConCom runat = 服务器 / >
< / select >
< / p >
< p >
< 选择 id = TireLine 名称 = Tireline < asp:Literal ID =' litTirelineDis' runat =' < span class =code-keyword> server' / >
< 选项 > TIRELINE < / option >
< asp:Literal ID = litTireline runat = server / >
< ; / select >
< / p >
< / ContentTemplate >
< / asp:UpdatePanel >
< span class =code-keyword>< / div >
< / form >
我有一个按钮在Page2.ASPX
< input id =btnAddNewSearchtype =buttononclick =showDialog('NewTireSearch'); value =添加新搜索/>
现在我想在btnAddNewSearch上写一个Jquery点击这样一个它应该打开Search.ASPX页面作为对话框窗口/弹出窗口
这是我用JQuery尝试的东西
$(文件)。就绪();
function(){
mfiJ(' #NewTireSearch')。dialog( );
}
函数showDialog(id){
debugger;
mfiJ(' #' + id).dialog( open);
}
函数closeDialog(id){
mfiJ(' #' + id).dialog( close);
}
这不起作用。有人可以帮帮我吗?
解决方案
(document).ready();
function(){
mfiJ(' #NewTireSearch')。dialog( );
}
函数showDialog(id){
debugger;
mfiJ(' #' + id).dialog( open);
}
函数closeDialog(id){
mfiJ(' #' + id).dialog( close);
}
这不起作用。任何人都可以帮我这个吗?
假设Page2.aspx有一个按钮btnAddNewSearch
和NewTireSearch在不同的页面Search.aspx。
1)使用window.open(Search.aspx。)从'btnAddNewSearch'点击打开Search.asxp。
2)然后使用
(文件)。就绪();
function(){
Hello experts,
Here is what I have
Search.aspx is a web form which has following code
<form id="form1" runat="server">
<div id="NewTireSearch" align="center">
<asp:UpdatePanel ID="uplNS" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" >
<ContentTemplate>
<p>
<select id="Manufacturer" name="Manufacturer" <asp:Literal ID='litManfDis' runat='server' />
<option>SELECT MANUFACTURER</option>
<asp:Literal ID="litManf" runat="server" />
</select>
</p>
<p>
<select id="ConCom" name="Consumer-Commercial" <asp:Literal ID='litConcomDis' runat='server' />
<option>CONSUMER/COMMERCIAL</option>
<asp:Literal ID="litConCom" runat="server" />
</select>
</p>
<p>
<select id="TireLine" name="Tireline" <asp:Literal ID='litTirelineDis' runat='server' />
<option>TIRELINE</option>
<asp:Literal ID="litTireline" runat="server" />
</select>
</p>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
I have a button in Page2.ASPX
<input id="btnAddNewSearch" type="button" onclick="showDialog('NewTireSearch');" value="Add New Search" />
Now I want to write a Jquery on btnAddNewSearch Click in such a away that it should open Search.ASPX page as a dialog window/ pop up window
Here is what I tried with JQuery
$(document).ready();
function(){
mfiJ('#NewTireSearch').dialog();
}
function showDialog(id) {
debugger;
mfiJ('#' + id).dialog("open");
}
function closeDialog(id) {
mfiJ('#' + id).dialog("close");
}
This is not working. Can anyone help me with this please?
解决方案
(document).ready(); function(){ mfiJ('#NewTireSearch').dialog(); } function showDialog(id) { debugger; mfiJ('#' + id).dialog("open"); } function closeDialog(id) { mfiJ('#' + id).dialog("close"); }
This is not working. Can anyone help me with this please?
Assuming Page2.aspx has a button btnAddNewSearch
and NewTireSearch is on different page Search.aspx.
1) Using window.open(Search.aspx.) to open Search.asxp from 'btnAddNewSearch' click.
2)Then use
(document).ready(); function(){
这篇关于使用Jquery打开页面作为对话框窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文