如何使用jquey显示弹出窗口并关闭弹出窗口。 [英] how to show popup and close the popup using jquey .

查看:133
本文介绍了如何使用jquey显示弹出窗口并关闭弹出窗口。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i想要为此打开一个弹出窗口我已编写代码为



< ; div id =divpoprunat =server>< / div> 

$(#divpop)。load(popup.aspx,function(response,status,xhr){
if(status ==error){
var msg =抱歉,但是出现了错误:;
$(#error)。html(msg + xhr.status ++ xhr.statusText);
}
});返回false;





弹出页面会显示图片,弹出页面有两个按钮

next,previous。



但问题是我点击下一个按钮然后上一个

 protected void imageNextClick(object sender,ImageClickEventArgs e)
{

}



父页 url(http:// localhost:51185 /Docu.aspx)被弹出页面url取代

http:// localhost:51185 / popup.aspx 我无法关闭弹出窗口并返回到父页面

解决方案

(#divpop)。load(popup.aspx,function(response,status,xhr){
if(status ==error){
var msg =抱歉,但有错误:;


(#error)。html(msg + xhr.status ++ xhr.statusText);
}
});返回false;





弹出页面会显示图片,弹出页面有两个按钮

next,previous。



但问题是我点击下一个按钮然后上一个

 protected void imageNextClick(object sender,ImageClickEventArgs e)
{

}



父页 url(http:// localhost:51185 /Docu.aspx)被弹出页面url取代

http:// localhost:51185 / popup.aspx 我无法关闭弹出窗口并返回父页面


您好,



在下一个按钮点击时添加javascript将关闭你弹出并发送对服务器的请求。



 onclick =   

Hi,
i want to open a popup for this i have written code as

<div id="divpop"  runat="server"></div>

$("#divpop").load("popup.aspx", function(response, status, xhr) {
  if (status == "error") {
    var msg = "Sorry but there was an error: ";
    $("#error").html(msg + xhr.status + " " + xhr.statusText);
  }
});return false; 



the popup page will display image ,the popup page has two button
next ,previous .

But the problem is when i click on button next and previous

protected void imageNextClick(object sender, ImageClickEventArgs e)
   {

   }


the parent page url(http://localhost:51185/Docu.aspx) is replace by popup page url
http://localhost:51185/popup.aspx and I am not able to close the popup and go back to parent page

解决方案

("#divpop").load("popup.aspx", function(response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: ";


("#error").html(msg + xhr.status + " " + xhr.statusText); } });return false;



the popup page will display image ,the popup page has two button
next ,previous .

But the problem is when i click on button next and previous

protected void imageNextClick(object sender, ImageClickEventArgs e)
   {

   }


the parent page url(http://localhost:51185/Docu.aspx) is replace by popup page url
http://localhost:51185/popup.aspx and I am not able to close the popup and go back to parent page


Hi,

Add javascript on next button click which will close you pop up and the send the request to server.

onclick = "


这篇关于如何使用jquey显示弹出窗口并关闭弹出窗口。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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