Hello!
I came across two different scripts [mouseover and opening the new pag
in a sized window] that I wanted to combine, and I thought I wa
successful until I discovered a minor glitch.
What was happening was that the page that was linked to came out fine
but the page where the link was was linking out to another page [tryin
to direct to the site in my code].
Here's what my code looks like.
<html>
<head>
<!--
This file retrieved from the JS-Examples archives
http://www.js-examples.com
1000s of free ready to use scripts, tutorials, forums.
Author: JS-Examples -
http://www.js-examples.com/
-->
</head>
<body>
<a href="Value="Open Window
ONCLICK="window.open('http://www.geocities.com/taintedrhapsody/tainted.html'
'Sample', 'width=600,height=600')" onmouseover='switchImages("on")
onmouseout='switchImages("off")'><img name="imagename" src="taintx.gif
border="0"></a>
<script>// This creates an image object.
var preloadedImage1 = new Image();// This tells the web browser t
download this image now (rather than later).
preloadedImage1.src="taint.gif";
// This creates an image object also.
var preloadedImage2 = new Image();// This tells the web browser t
download this image now (rather than later).
preloadedImage2.src="taintx.gif";
function switchImages(_onOff) {
if (_onOff=="on")// This replaces the image in the objec
"preloadedImage" and puts
// a copy into the document image object that was defined up above/
with the "img" tag.
document.imagename.src=preloadedImage1.src;
else
document.imagename.src=preloadedImage2.src;
}
</script>
</body>
</html>
What I want my page to do is:
1. The image that links to my main page have a mouseover effect.
2. Have my main page open in the sized window without error.
3. Have the page with the image NOT link or try to open a differen
site.
If someone could help me, I'd be really grateful
Unregistered
-----------------------------------------------------------------------
Posted via
http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread:
http://www.forum4designers.com/message34382.htm