Welcome, Guest
  • Author Topic: pop up window problem::HELP  (Read 2509 times)

    sinead

    • Server what's that
    • *
    • Posts: 50
      • View Profile
      • Email
    pop up window problem::HELP
    « on: 09/20/05, 10:56 »
    Hi there

    am using flash, php and mysql to create an application. Throughout this i need to allow users to open files which is where i use javascript to open them in a new window. THe problem is that I keep getting this error when i try to access the files remotely through the website but it seems to work when i test using local host....its driving me mad!! Doea anyone know the answer?? Here is the error message i keep gett and after that I have inserted the javascript i use to open a new window. Hope someone can help!

    Line: 1
    Char: 1
    Error: The callee (server[not server application]) is not available and disappeared; all connections are invalid. The call did not execute.
    Code: 0




    And the js is as follows:



    <SCRIPT LANGUAGE="JavaScript">

    var newwin;

    function launchwin(winurl,winname,winfeatures)

    {

    //This launches a new window and then

    //focuses it if window.focus() is supported.

    newwin = window.open(winurl,winname,winfeatures);

    if(javascript_version > 1.0)

    {

    //delay a bit here because IE4 encounters errors

    //when trying to focus a recently opened window

    setTimeout('newwin.focus();',250);

    }

    }

    </SCRIPT>

    papachan

    • Systems Administrator
    • *****
    • Posts: 507
      • View Profile
      • Air Flex Developer
    Re: pop up window problem::HELP
    « Reply #1 on: 09/20/05, 11:18 »
    are you calling "launchwin" like this???


    getURL("javascript:launchwin('http://delicodeclic.com/home.hmtml','','height=600,width=600,scrollbars=no,toolbar=no');");

    your javascript function is correct, may be somre other problem... like security broswer...

    sinead

    • Server what's that
    • *
    • Posts: 50
      • View Profile
      • Email
    Re: pop up window problem::HELP
    « Reply #2 on: 09/21/05, 04:14 »
    Hi papachan
    yes i am calling launchwin as you said below. The thing is, when i use mozilla's firefox, I can open the files in the pop-up window. However, when i use IE6.0 it gives me that error. I don't know how to fix this as I have alreadygone into the security settings and made sure that it doesn't block any pop-up windows. Do you have any ideas?

    thanks for your help

    papachan

    • Systems Administrator
    • *****
    • Posts: 507
      • View Profile
      • Air Flex Developer
    Re: pop up window problem::HELP
    « Reply #3 on: 09/21/05, 08:26 »
    strange...
    can i see your exemple page????

    Dirk Watkins

    • Server what's that
    • *
    • Posts: 13
      • View Profile
      • Dirk Watkins
    Re: pop up window problem::HELP
    « Reply #4 on: 11/28/05, 12:41 »
    Maybe this code will help you.  It's what I use to open up new windows.

    Code: [Select]
    var popUpWin=0;
    var popUpPrintWin=0;

    /***************************************************/
    /* popUpWindow                                     */
    /* opens up a new window with width and height     */
    /* specified - if dimensions are not specified it  */
    /* defaults to a percentage of the users screen    */
    /***************************************************/

    function popUpWindow(URLStr, width, height) {
       var frameWidth;
       var frameHeight;
       
       if (self.innerWidth) {
          frameWidth = self.innerWidth;
          frameHeight = self.innerHeight;
       } else if (document.documentElement && document.documentElement.clientWidth) {
          frameWidth = document.documentElement.clientWidth;
          frameHeight = document.documentElement.clientHeight;
       } else if (document.body) {
          frameWidth = document.body.clientWidth;
          frameHeight = document.body.clientHeight;
       } else {
          //could return here
          width = 400;
          height = 400;
       }
       
       frameWidth=parseInt(frameWidth);
       frameHeight=parseInt(frameHeight);
       
       //if width and height are not specified give them percentages of the window
       if (width == null) { width = frameWidth * .5; }
       if (height == null) { height = frameHeight * .7; }
       
       var left = (frameWidth/2) - width/2;
       var top = (frameHeight/2) - height/2;
       
       if(popUpWin) { if(!popUpWin.closed) popUpWin.close(); }
       
       popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=no,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
       //popUpWin.setFocus();
    }

    -Dirk Watkins

    papachan

    • Systems Administrator
    • *****
    • Posts: 507
      • View Profile
      • Air Flex Developer
    Re: pop up window problem::HELP
    « Reply #5 on: 11/28/05, 13:27 »
    so much code for less use, if your width is null, so it take the percent value of your detected width or detected height, So if you want to change this,  :-\ you need another argunment, so... what's the sense of your posted code?