View Full Version : This script worked for me at 1st - now it doesn't

03-09-2011, 06:48 PM
1) Script Title: Depressible Image Link Script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/image1.htm

3) Describe problem: Hello. I used this depressible image script several times while testing buttons for a web page that I'm making. Many times over, it worked perfectly. Then one day about 2 weeks ago, while testing more buttons in Dreamweaver, it suddenly didn't work anymore. To give you some background. I don't know diddly about coding. But I was able to take this script into the code panel of the button that I had made in the design panel and remove the Dw generated code and replace it with DD's script. Of course, I inserted my own file names and link, as well. Like I said, it tested perfectly. Literally dozens of times over the course of two or three days, then in the middle of the last day, it didn't work anymore and kept showing my image as broken.

Here is what the code looks like, after making the necessary replacements. The link, is not the page where the final project will show up, but just one for testing the script.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript1.2">

Depressible Image Script-
Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com

img1=new Image()
img2=new Image()

<a href="http://www.facebook.com/index.php?lh=2f1d79d63e7c1157b4639ad4234cf4dd&eu=g87Aba2CdA7IavedSNaC_w" onMousedown="document.images['example'].src=img2.src" onMouseup="document.images['example'].src=img1.src">
<img src="tttupglossyboxbutton.png" name="example" border=0></a>

I hope that is the way to add a code tag. My apologies if I didn't do it right. I'd be happy to repost if needed, with proper instructions. So anyway, I would appreciate any help that can be offered. I've never found a depressible image script anywhere else and I'm super excited to use it. I consider it to be a must-have for the Facebook fan page that I'm making for someone and the deadline is quickly approaching. Thank you in advance.