Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i am developing a job board site like monstor.
in this, i have a grid which displays candidate details like name,attached CV, preview CV.
preview CV is open popup window when we click it.
grid also have option to "check all" the candidate by clicking single check box in header.
but while click header checkbox,the page will be postback.
now my problem is, i open the popup window,it has open correctly but if i click "check all" checkbox while popup window opens,it page shows the popup URL not the page URL.
for example, popup URL is
"PreviewCV.aspx?URL=CV_31128.pdf&h=906&w=1263&applicationID=44326&jobId=3396"
page URL is 'ViewJobApplication?JobId=3430&ApplicationStatus=viewed"


if i click the check all option, the page is postback and show the popup URL.
my modal popup script is below:

C#
function opendialog(url,Id) {
            var h = $(window).height();
            var w = $(window).width();

            h = h - (h * 25 / 100);
            w = w - (w * 25 / 100);
            var jobId = '<%= Request.QueryString["JobId"] %>';
            $('#PreviewCV').load('Admin/PreviewCV.aspx?URL=' + url + '&h=' + parseInt(h) + '&w=' + parseInt(w) + '&applicationID=' + Id + '&jobId=' + jobId, function () {
                return false;
            }); 
           
            var $dialog = $('#PreviewCV')
              .dialog({
                  autoOpen: false,
                  modal: false,
                  height: h,
                  width: w,
                  title: 'Preview CV',                  
                  close: function () {
                      $dialog.dialog("close");
                  }
              });
              $dialog.dialog("open");
           
        }
Posted
Updated 4-Mar-15 0:36am
v2

1 solution

try this code

1. $('#dialog').dialog('close');

2.

// post form
$( "#dialog" ).dialog({
close: function( event, ui ) {
$('form').submit();
}
});

// refresh - no data sent to server
// post form
$( "#dialog" ).dialog({
close: function( event, ui ) {
location.reload();
}
});
 
Share this answer
 

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