Welcome, Guest
  • Author Topic: Opening Popup window from within SWF question (f5)  (Read 2418 times)

    ericinho

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Hi all,

    Found the cool javascript in flash popup generator and generated the code.
    It works, but one thing is a not so cool side effect... the URL in the address bar of the browser is replaced by the entire javascript string in the action  (javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,%20status=No,%20resizable=No,fullscreen=No');%20%20NewWindow.focus();%20%20%20%20%20%20void(0);)


    besides being quite ugly, it also messes up bookmarks.

    is there a way to prevent the URL in the addressbar to be switched with the newWindow string????

    thanks!

    ericinho

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Opening Popup window from within SWF question (f5)
    « Reply #1 on: 06/03/03, 08:17 »
    maybe with setURL or so, though it has to work with most browsers

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:Opening Popup window from within SWF question (f5)
    « Reply #2 on: 06/03/03, 09:25 »
    Is not an ussual effect. Check your syntax. Which browser are you using?

    Jorge

    ericinho

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Opening Popup window from within SWF question (f5)
    « Reply #3 on: 06/03/03, 09:27 »
    :)

    yeah, i know it is not unusual ;)

    the code in Flash is:

    on (release) {
    getURL ("javascript:NewWindow=window.open('http://www.url.com/page.htm','newWin','width=340,height=340,left=0,top=0,toolbar=No,location=No,
    scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
    }


    the tag is on one line btw (just like you guys tell to do).

    btw the javascript flash button generator gives the same problem...

    my system is PC win NT4 IE5.5
    « Last Edit: 06/03/03, 09:32 by ericinho »

    Susana

    • Server what's that
    • *
    • Posts: 13
      • View Profile
      • Email
    Re:Opening Popup window from within SWF question (f5)
    « Reply #4 on: 02/05/04, 15:52 »
    Hi,

    I guess that, by this time you probably have fixed your problem.
    Anyway, I've done this recently and I haven't got that problem. Instead of calling the window.open function from inside of my flash code, I have created a javascript function to open the new window in my html file, and I've called this function from my flash code, using getURL.

    UfORiC

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:Opening Popup window from within SWF question (f5)
    « Reply #5 on: 04/04/04, 02:32 »
    Hi Susana,

    If possible, can you enlighten us with the code you mentioned? I am also doing the same thing, and very new this. You mentioned writting a Javascript inside the html page you are calling....please elaborate, thank you for you help.....

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re:Opening Popup window from within SWF question (f5)
    « Reply #6 on: 04/04/04, 03:07 »
    Hi all together ;)
    in my opinion, you should manage the window management inside of the target script, which means, you have a JavaScript inside of the target document, beeing called by the onLoad event.

    Then you can call this window either from another window/Frame, or just by using getURL.
    Even if somebody opens this url directly, it produces the same visual output.
    happy flashing
    8)
    Ronald