3 Replies Latest reply on Mar 4, 2007 9:26 PM by Newsgroup_User

    getURL - javascript - popup window

    Ares94
      Hi!

      I need to get a button to open a new, fixed-size, pop-up window.
      This is what I used:

      on (release) {
      getURL("javascript:window.open('ponuda_tjedna.html','Ponuda tjedna','width=350,height=250')");
      }

      It works just fine, opens a new window etc. but the main window where the button is (where the site is) goes blank, white.. and in the upper lef corner it says: [object Window]. If I click BACK, it restarts the entire site.

      What can I do to keep the main window where it is?
      I've also tried writing a function in javascript directly into the <head> tag of index.html and call the function from within Flash, using getURL. That did open a new window and the main site didn't go blank, but in IE nothing happened.

      ????
      Thanks,
      Igor
        • 1. Re: getURL - javascript - popup window
          Level 7

          > on (release) {
          > getURL("javascript:window.open('ponuda_tjedna.html','Ponuda
          > tjedna','width=350,height=250')");
          > }
          >
          > It works just fine, open a new window etc. but the main window where the
          > button is (where the site is) goes blank, white.. and in the upper lef corner
          > it says: [object Window]. If I click BACK, it restarts the entire site.

          You need void(0) with window.open because it returns stuff and if you don't void
          the request it will do exactly what it does to you. Not the case if you are using
          NewWindow function. Anyway, try this instead:

          getURL("javascript:n_name=window.open('ponuda_tjedna.html','Ponuda_tjedna','width=350,heig ht=250');void(0);");


          --
          Best Regards

          Urami


          --

          !!!!!!! Merry Christmas !!!!!!!
          &
          Happy New Year


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>
          • 2. Re: getURL - javascript - popup window
            Ares94 Level 1
            Yes, yes, yes!!!:D
            Thanks a lot, that's it!!
            • 3. Re: getURL - javascript - popup window
              Level 7



              > Yes, yes, yes!!!:D
              > Thanks a lot, that's it!!

              Glad you got it working :)
              have a good day Ares


              --
              Best Regards

              Urami


              --

              !!!!!!! Merry Christmas !!!!!!!
              &
              Happy New Year


              <urami>
              If you want to mail me - DO NOT LAUGH AT MY ADDRESS
              </urami>