TL63
08-21-2002, 01:19 PM
Hi to all,
Is it possible to have an alert box when a visitor clicks on an image, instead of text?
It's not mega-important just a bit of fun.
I'm using the following code '<A HREF="noplace" onMouseover="alert('Blah-di-blah')"> Don't click this link!</A>
although I do have the following script for my mouseover nav buttons in the HEAD section.
<SCRIPT language="JavaScript">
<!--
if (document.images)
{
pic1on= new Image(88,31);
pic1on.src="images/butt2.gif";
pic2on= new Image(88,31);
pic2on.src="images/butt3.gif";
pic3on= new Image(88,31);
pic3on.src="images/butt4.gif";
pic4on= new Image(88,31);
pic4on.src="images/butt5.gif";
pic1off= new Image(88,31);
pic1off.src="images/butt2_over.gif";
pic2off= new Image(88,31);
pic2off.src="images/butt3_over.gif";
pic3off= new Image(88,31);
pic3off.src="images/butt4_over.gif";
pic4off= new Image(88,31);
pic4off.src="images/butt5_over.gif";
}
function picon(imgName)
{
if (document.images)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}
function picoff(imgName)
{
if (document.images)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//-->
</SCRIPT>
If the answer is No, I'm gonna laugh first, then cry.
Thanks.
:D
Is it possible to have an alert box when a visitor clicks on an image, instead of text?
It's not mega-important just a bit of fun.
I'm using the following code '<A HREF="noplace" onMouseover="alert('Blah-di-blah')"> Don't click this link!</A>
although I do have the following script for my mouseover nav buttons in the HEAD section.
<SCRIPT language="JavaScript">
<!--
if (document.images)
{
pic1on= new Image(88,31);
pic1on.src="images/butt2.gif";
pic2on= new Image(88,31);
pic2on.src="images/butt3.gif";
pic3on= new Image(88,31);
pic3on.src="images/butt4.gif";
pic4on= new Image(88,31);
pic4on.src="images/butt5.gif";
pic1off= new Image(88,31);
pic1off.src="images/butt2_over.gif";
pic2off= new Image(88,31);
pic2off.src="images/butt3_over.gif";
pic3off= new Image(88,31);
pic3off.src="images/butt4_over.gif";
pic4off= new Image(88,31);
pic4off.src="images/butt5_over.gif";
}
function picon(imgName)
{
if (document.images)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}
function picoff(imgName)
{
if (document.images)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//-->
</SCRIPT>
If the answer is No, I'm gonna laugh first, then cry.
Thanks.
:D