Window Launching Technique 3 Revision History

May 21, 1999
version 2.5 posted. here's what changed:
i rewrote the launchwin() function so it no longer needs any variable clearing support from child windows. finally the function is back to a nice clean approach, with the small exception of the tricks needed to handle the back button of the browser. the changes are based on my new window launching script described in javascript utopia.

March 11, 1999
Changed the JavaScript cut'n'paste code to match the real code. The cut'n'paste version had fallen out of synch somehow.

February 09, 1999
Version 2.4 posted. Changes:
  • A helpful guy from Flasher-L posted the proper way to use setTimeout, and I updated the script to reflect it. Thankfully, this meant I could get rid of the hidden form elements and new popthewindow() function that I had to introduce in version 2.3. Here's the correct usage of setTimeout() that allows for arguments:
    setTimeout('anyFunction("' + arg1 + '","' + arg2 + '","' + arg3 + '")',1000); // 1000ms = 1 second

February 08, 1999 -- later that day
Version 2.3 posted. Changes:
  • Finished a better fix to the IE4 problem that works around the issue of setTimeout having problems passing arguments to functions. I now just use setTimeout to call a new function--popthewindow(), which retrieves the parameters for the call from hidden form fields that are set when the launchwin() function is called. So the script now works on IE4 properly without losing the capabilities it gained in version 2.1. Though I still consider it annoying that setTimeout has problems with passing arguments to functions. I'm going to keep looking into making this work so i don't have to add the new popthewindow() function.

February 08, 1999
Version 2.2 posted. Changes:
  • I had to change the launching technique to accomodate a problem with IE4. When the launch button was clicked the first time, IE4 opened the window. When it was clicked the second time, the script was supposed to close the previous window (if it existed) then re-open the new window. IE4 only closed the window, and was skipping the re-open part. It seems that IE4 tried to reopen the window before it finished closing it, so it figured the window was already open and didn't bother re-opening it. The fix was to re-open the window using a setTimeout to wait for a split-second before re-opening the window. This was really unfortunate because commands called from within setTimeout don't have access to variable values set in the host function. So you have to hardcode the values normally supplied by winurl, winname, and winfeatures. And *that* means the script will only work with a single popup window. Sigh. I'm working on a better fix.

December 03, 1998
Version 2.1 posted. Changes:
  • launchwindow-bottom.html now passes the the URL and window features as arguments to the launchwin() function in moviepage.html. This make it possible to open more than one window (each with its own characteristics and starting page) by creating multiple versions of launchwindow-bottom.html.
  • launchwin() no longer uses window.focus() to bring existing windows to the front of the screen. Instead, it closes the previous window and then launches the new one. This allows new windows which are different from previous windows to launch properly, and prevents more than one secondary window from existing at the same time.
  • launchwin() no longer notifies users when they attempt to open a new window without closing a previous one. This feature would confuse the user in the multiple-window scenario allowed in Version 2.1.

November 28, 1998
Version 2 posted. Tutorial rewritten to be friendlier to younger JavaScript/HTML/Flash users. Code examples now shown in Courier New, for easier reading with text. New in Flash Window Popper, Version 2:
  • Window Popper now checks for checks for previously launched windows before it launches a new one. If the user tries to open a second window before closing the first one, Window Popper will notify them that the window is already open, and will bring it to the front of the screen (feature not available in IE3).
  • Fixed BACK button problem where pressing BACK on browser caused window to relaunch instead of returning user to previous page. This is an extension to the BACK button fix posted on November 23, 1998. To accomodate Netscape4's problematic implementation of history.back(), we now sniff Netscape4 and use location.replace() instead of history.back() for that browser only. See JavaScript Utopia for a full description of the Netscape4 back problem.
  • Moved launchwin() function to the top frame so the newwin variable isn't lost when history.back() or location.replace() is called.
November 23, 1998
Changed method of removing window-launching page from bottom frame. Instead of window.location.href="empty.html", I now use window.history.back(). This fixes the problem users were having where the BACK button launched a new window instead of returning users to the previous page. Note that Netscape 4 loads the previous page properly, but does not seem to update its history. Unfortunately this means that Netscape 4 users will have to click twice to return to a previous page, but at least they aren't caught in the old window launching loop.