Popup windo refusing to open a child popup

Discussion in 'JavaScript' started by Tayana, Aug 21, 2008.

  1. #1
    I have an java web application that is launched and ran as a popup window. I also run pdf reports that are being shown on same popup page. what i want is to show the reports on a new window. I'm using window.open which i used for opening the application window but its not opening the new window on IE and firefox. this is how i am doing it currently:


    function report_popup(url, name, height, width) {
    var top=((screen.height-(screen.height/1.618))-(height/2));
    var left=((screen.width-width)/2);
    var args= "height=" + height + ",width=" + width +
    ",top=" + top + ",left=" + left;
    popup = window.open(url, name, args);
    popup.focus();

    }



    function report_launch() {
    report_popup("..faces/report/ReportsPage.jsp",
    "Reports", 700, 800);
    }
    window.onload = report_launch;


    The application window is poping ok but any subsequent popups are not, is it something wrong in my script or maybe i have to implement it in a different way.

    Your help please!!!!!!!!!!!!!!
     
    Tayana, Aug 21, 2008 IP
  2. engager

    engager Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    window.onload = report_launch;

    try replace with

    window.onload = report_launch();
     
    engager, Aug 22, 2008 IP
  3. engager

    engager Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    And by the way, may be it's better to assign calling "report_launch();" to onload event of <BODY> tag?
     
    engager, Aug 22, 2008 IP