Forum Moderators: open

Message Too Old, No Replies

Rollover problem

         

mkhutch

2:48 am on Jun 5, 2005 (gmt 0)

10+ Year Member



I'm having trouble getting my rollovers to work properly. I'm using ImageReady CS2 to creat the page and when I preview the files from Imageready/Photoshop evrything is great. But when I preview from desktop or from the server, the rollover image will not work. The rollover link is good, but not the gif image. Please help. Also is there a good way to encrypt my image files from being taken? I tried the HTML Privacy software but don't like the header promoting their software on it. The security feature in Imageready did not work. Here is some code from the site:

var preloadFlag = false;
function preloadImages() {
if (document.images) {
infinitdesign_over = newImage("images/infinitdesign-over.gif");
portfolio_over = newImage("images/portfolio-over.gif");
Philips_over = newImage("images/Philips-over.gif");
UGA_over = newImage("images/UGA-over.gif");
contact_over = newImage("images/contact-over.gif");
Tech_over = newImage("images/Tech-over.gif");
TII_over = newImage("images/TII-over.gif");
Hansgrohe_over = newImage("images/Hansgrohe-over.gif");
Wireless_over = newImage("images/Wireless-over.gif");
AMCOM_over = newImage("images/AMCOM-over.gif");
West_Texas_over = newImage("images/West-Texas-over.gif");
id3M_over = newImage("images/3M-over.gif");
Mitsumi_over = newImage("images/Mitsumi-over.gif");
Orkin_over = newImage("images/Orkin-over.gif");
GM_over = newImage("images/GM-over.gif");
preloadFlag = true;
}
}

and

<a href="about.html"
onmouseover="changeImages('infinitdesign', 'images/infinitdesign-over.gif'); return true;"
onmouseout="changeImages('infinitdesign', 'images/infinitdesign.gif'); return true;"
onmousedown="changeImages('infinitdesign', 'images/infinitdesign-over.gif'); return true;"
onmouseup="changeImages('infinitdesign', 'images/infinitdesign-over.gif'); return true;">
<img name="infinitdesign" src="images/infinitdesign.gif" width="62" height="27" border="0" alt=""></a></td>
<td colspan="5" rowspan="4">

Thanks,
Marty

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

[edited by: tedster at 2:55 am (utc) on June 5, 2005]

[edited by: mkhutch at 3:06 am (utc) on June 5, 2005]

tedster

3:06 am on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Marty, and welcome to the forums.

First thing I'd suggest is validating your html and css:

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

If all is well there, next is to make sure your images are really in the place your javascript or css says they should be, no typos in the file names, paths and so on.

And no, there is no way to stop image theft from happening. If it's displaying on someone's monitor, then they must already have the file on their hard drive. You can make it harder for the casual thief, but the tech savvy can always reuse any image they want.

mkhutch

3:21 am on Jun 5, 2005 (gmt 0)

10+ Year Member



I tried the validator and the errors its giving me is code not realted to rollovers. Would that matter?

As far as security, I understand the pros can get the images, but is there a way to disable the right-click for the average user?

tedster

5:41 am on Jun 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Javascript can disable the right click - easily found through a search engine. However, there's a lot of functionality available with a right click that the "average user" is accustomed to. They may not like your website messing with that functionality. I advise against it.

...code not realted to rollovers. Would that matter?

It can. You never know what kind of knots you are creating in the browser's internal code when you throw it into error recovery routines. Trying to debug pages when their mark-up is not valid is a sure way to spend 4 times as much time as you really need to,

However, this kind of rollover depends on javascript - particularly the function changeImages() that is being called through the mouse events. Have you called that function somehow (head or external file)?

ponce007

8:27 am on Jun 7, 2005 (gmt 0)

10+ Year Member



Hi Mkhutch,

1. Visit the page through a browser (Internet Explorer).
(You see the broken image links...as you said)

2. Right click the broken image and click "Properties"

3. Then try to see if the file and the path 'exists' on your server.

You probably cannot see the image because it doesn't exist (meaning the file does not exist in the given path)

BEST GUESS:
*************
You are on a UNIX server where file names are case sensitive.
So pay particular attention to the case (upper and lower) of the file and folder names in your server versus what the browser 'Properties' shows.
*************

Hope that helps