View Full Version : Possible to add mouseover to floatie?

01-22-2006, 08:27 AM
I was just wondering if it's possible to add mouseover and onclick functions to a dingbat image i put inside of the dhtml floatie tooltip found here...


Wanting to use an image i created to close the floatie instead of "Hide Box" and thought it would be nice to add rollover effects.

floattext[0]='<b><font size="-1" color="#FF6600">Mailing Address:</b> PO Box 666 Some Town, BS 42069<br><b>Location:</b> 420 North Bud St. Some Town, BS</br><b>Telephone:</b> 1-555-420-6969</br><b>Fax:</b> 1-555-420-0123</br><b>E-mail:</b> emailthingy@myserver.com</br></br><div align="right"><a href="javascript:hidefloatie()"><img src="closeXoff.gif" srcover="closeXover.gif" srcdown="closeXclick.gif" border="0" alt="Closes this box."></a></div>'

I have tried it every way that I can imagine only to either get javascript errors or the effect just doesn't work. Here is where you can find the rollover script that I have tried to use...


other than the script I have also just tried adding a "onMouseOver" function to the <a href="javascript:hidefloatie()"> but that doesn't work, I have also tried just adding it into the <img> tag... once again, no success...

Now, I am using the floatie script itself as an external script in my page, but I have tried putting it back into the head of the document and still get the same lack of results. Any help would be greatly appreciated.

***Forgot to specify I'm hoping to get a "mouseover" AND "onClick" function***

01-22-2006, 11:25 AM
What's all this srcover=, srcdown= rubbish?

<img src="closeXoff.gif" onmouseover="this.src = 'closeXover.gif';" onmouseout="this.src = 'closeXoff.gif';" onmousedown="this.src = 'closeXclick.gif';" onmouseup="this.src = 'closeXover.gif';" style="border-style:none;border-width:0;" alt="x" />

01-22-2006, 11:40 AM
RUBBISH! I tell you!
Well now... If you had read the entire post, I'm sorry, not "read" but "comprehended" the entire post you would have seen that little link thingy right below witht the text that said "here's where you can find the rollover script I tried to use" Thank you so much for your ever so helpful analysis of my situation though.

01-22-2006, 12:16 PM
Ah! You're right. I do apologize. Failed to read the link.
To be honest with you, I'm not sure this script is such a good idea. Odd things may result from using arbitrary attributes.

01-22-2006, 12:18 PM
No probs... i'm just in a bad mood today cuz this site has given me nothin but problems since i accepted it...

01-22-2006, 12:20 PM
Would you mind linking to the page, or providing a whole copy of the source?