Click here to Skip to main content
14,699,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have a popup which loads html file with java script sources attached. this pop up is created by an iframe. the html inside the iframe has link which is expected to create another popup but the iframe is not allowing me. is there anyway i can create another popup using the parent page or get ride of the the iframe. the code that creates the first popup is the following:

function GetPopUp ("../folder/file.htm", "POPUP Title")
 {
  var xpos = mouse_x;
  var ypos = mouse_y;
  var windowID = $(href.split('/')).last()[0].split('.')[0];
  var $dialog = $("#" + windowID)

  var dimensions = GetPopUpDimensions(windowID);

   $('body').after('<iframe id="' + windowID + '" style="padding:0;" src="' + href +    '">  </iframe>');
   $dialog = $("#" + windowID)
   $dialog.dialog(
    {
      autoOpen: false,
      title: title,
      position: 'center',
      sticky: false,
      width: dimensions.DialogWidth,
      height: dimensions.DialogHeight,
      draggable: true,
      resizable: false,
      modal: true,
     close: function () {
        $(this).dialog('destroy');
        $("#" + windowID).remove();
    }
  });
    $dialog.load(function () {
       $dialog.dialog('open');
       $dialog.css("width", "100%"); // reset the width that is set by jquery UI
   });
 }
Posted

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