0

I am using jquery dialog to open an aspx page, which has a form for sending email. I need to pass the title and url of the calling page to the dialog so that it is sent in the email. Previosuly, I had the email form inside a div on the calling page and on the click of an anchor the div was displayed in the dialog and a user could send out an email from the dialog. However, now i moved the email form to a separate aspx page which is called on the open dialog e.g

$(document).ready(function () {

     var dlg = $("#dialog").dialog({
         autoOpen: false,
         modal: true,
         draggable: true,
         resizable: true,
         width: 550,
         title: 'Send Email',
         minHeight: 10,
         minwidth: 10,
         closeText: 'X',
         closeOnEscape: true
     });

     var pgTitle = $(document)[0].title;
     var pgURL = window.location.pathname;


      $("#dialog_link").click(function () {

         var urlLink = "Email.aspx"; //?title=" + pgTitle + "&url=" + pgURL;
         // $("#dialog").dialog("open");
         dlg.load(urlLink).dialog('open', function () {
             $(this).dialog('open');
         });

     });
 });

If I append the url and title values in the urlLink, the Email.aspx page is not displayed in dialog. When I remove them then the page is displayed. How am i supposed to pass these parameters to Email.aspx?

Thanks

WEFX
  • 8,298
  • 8
  • 66
  • 102
Sugar Bowl
  • 1,722
  • 1
  • 19
  • 24

1 Answers1

0

If the iframe src is https:, I use parameters in the url and use javascript to parse.

If the iframe src is not https, I use variables and access them from the iframe page using window.parent in the javascript.

Jason
  • 7,612
  • 14
  • 77
  • 127