Re: Preloading / Pop-ups

by "Ben Russo" <i.am.ben(at)sympatico.ca>

 Date:  Thu, 19 Jul 2001 13:27:11 -0700
 To:  <David.Artiss(at)boots.co.uk>,
<hwg-techniques(at)hwg.org>
 References:  co
  todo: View Thread, Original
<script language="javascript">

image1 = new Image();
image1.src = "first_image.gif";

image2 = new Image();
image2.src = "second_image.gif";

</script>

That's how you preload images.  "image1" and "image2" are the names of the
images you're preloading, so when you use the preloaded images, you recall
them with the help of their name.  Here's a mouseover example:

<.a href="the-link.htm" onMouseOver="document.image1.src='first_image.gif'"
onMouseOut="document.image1.src='original_image.gif'; "><.img
src="original_image.gif" border=0 name="image1"><./a>

original_image.gif  -  the image that's there before the mouseover
document.image1.src  -  the command that searches and displays the images

Does this help?

- Ben

----- Original Message -----
From: <David.Artiss(at)boots.co.uk>
To: <hwg-techniques(at)hwg.org>
Sent: Thursday, July 19, 2001 1:13 AM
Subject: Preloading / Pop-ups


> I have a couple of questions I've been saving up....
>
> 1. I heard mention last week about pre-loading "mouseover" images. Can
somebody
> tell me how this is done ?
>
> 2. A client wants a pop-up window to appear behind the main browser window
so
> that when you leave their site and close down the window you see this
pop-up
> behind. I followed the recent instructions on how to get a pop-up,
activated by
> a window.open, to hide behind the main browser but I couldn't get it to
work. I
> therefore changed it so that it appears on an "unload". As I'm using
frames it's
> on the menu frame so it doesn't get launched everytime they main frame is
> updated with a new page. However, if you do a refresh of the screen (as
people
> do) this causes the pop-up to appear as the full frame is re-launched. Any
> thoughts of a way for me to achieve what the client wants ?
>
> Thanks in advance.
> David.
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.