Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Hi,

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

JavaScript
onclick = "$("#divpop").unload();"
 
Share this answer
 
v2
Comments
aassaahh 10-Jan-13 12:16pm    
but i want to write some server side code in the next button ,which will get data from the database.
aassaahh 10-Jan-13 12:23pm    
after getting data from the database user wll click cancel button which will hide the popup.
Suvabrata Roy 10-Jan-13 23:33pm    
Your problem is postback,
So you can fetch data asynchronously and display data on the page.

http://jquery-with-asp.net/2011/07/button-click-event-via-ajax-with-jquery/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900