PDA

View Full Version : Can't find script



Chadi
01-08-2006, 12:01 AM
I am looking for an image mouseover script that will display the text I input in the code when you mouseover the image, then disappear when you mouse away. I need the text to appear below the table (containing the 4 images I have now).

www.talkjesus.com

See right side of the shoutbox on home page. I need the text to appear strictly below the 4 images, centered anytime you mouseover any of the 4 images.

Thanks in advance!

jscheuer1
01-08-2006, 07:34 AM
Those are 'smilies' and the code for them is dynamically generated either by the forum software's server side language or by its javascript or more likely, both. To give each one a mouseover event, it would be best to do so in the places that their other attributes are assigned in the forum software, wherever that is. You could do something like:


onmouseover="document.getElementById('displayarea').innerHTML='Love'"

for the heart one might work, depending upon how it is created in the DOM. Assigning a function might be required though:


onmouseover=function(){
document.getElementById('displayarea').innerHTML='Love'
}

You would have to assign the id of 'displayarea' to the element where you want these messages to appear and also construct equivalent onmouseout events to return the text to whatever it should be in the 'resting' state, or blank (probably the paragraph (<p>) that currently says "You must be registered and confirmed active account to use the shoutbox " is the target for these text if so, I'd give it the id). Finding where in the code to do this could be hard. If you would be happy just having it work via javascript, a script could be written to identify each of these smilies by their alt or src attributes and assign mouse events that way but, it would have to be an onload event. I see you have numerous scripts on the page already so there could be conflicts even using add event handlers. But it would be worth a shot. Let me know first if you know or can find where in the forum code the smilies get assigned their src and alt attributes, as that would be the ideal place to assign mouse events.

Chadi
01-14-2006, 10:43 PM
Where do you get smilies from? These are regular gif images I made not smilies. Look on the left column menu under "entertainment" to see what I am talking about. Four images, colored with text tip only.