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

4

1 に答える 1

0

iframe srcがhttps:の場合、URLのパラメーターを使用し、JavaScriptを使用して解析します。

iframe srcがhttpsでない場合は、変数を使用し、javascriptのwindow.parentを使用してiframeページからそれらにアクセスします。

于 2012-07-19T13:24:38.070 に答える