jules627
06-03-2003, 02:03 AM
Hello,
I'm trying to use the chromeless windows and instead of a text link to open them, i have a gif that I want to use. I'm having trouble getting this to work... I'm not all that familiar with javascript. If anyone could help me... that would be great, thank you!!!
Just replace the text with the image:
<a href="#" onclick="mywindow=openIT('window.html', 400, 200, null, null, 'mywindowname')">
<img src="IMAGE.GIF">
</a>
jules627
06-03-2003, 01:58 PM
Ok, but the problem with that is the gif I want to use has its own big chunk of code to make it work... it's also javascript. I'll try it again though... thank you :)
starlet
06-03-2003, 02:33 PM
What is it? a mouse over or something? anyway, if you post the code for the image here someone might be able to help you out!
jules627
06-04-2003, 11:58 PM
Ok, here is the code for the mouseover:
(I'm trying to get it to work as a link to the chromeless windows I'm using.)
<SCRIPT TYPE="text/javascript">
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
on = newImage("images/on.gif");
preloadFlag = true;
}
}
// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR=#FFFFFF ONLOAD="preloadImages();">
<p>
<!--- this is the start of the button image information --->
<A HREF="#"
ONMOUSEOVER="changeImages('off', 'images/on.gif'); return true;"
ONMOUSEOUT="changeImages('off', 'images/off.gif'); return true;">
<IMG NAME="off" SRC="images/off.gif" BORDER=0 ALT=""></A>