tool tip

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
myasirm
Forum Commoner
Posts: 54
Joined: Sat Sep 12, 2009 3:57 am

tool tip

Post by myasirm »

hi guys
i want to display a message on the text means when i move mouse iver that text it display a message so kindly send me the code how can i do this
thanks in advance
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: tool tip

Post by markusn00b »

Do you understand the difference between PHP and Javascript? Server-side and Client-side? If not, give it a quick google; PHP will not does not interact with the browser in the sense you are looking for. Javascript, however, will.

Code: Select all

 
<script>
    window.onload = function() {
        document.getElementById('letmegooglethatforyou').attachEventListener(
            'mouseover',
            function() {
                location.href = "http://lmgtfy.com/mouseover+javascript"
            }, false
        );
    }
</script>
<p id="letmegooglethatforyou">Click here for the answers to life's secrets!</p>
 
myasirm
Forum Commoner
Posts: 54
Joined: Sat Sep 12, 2009 3:57 am

Re: tool tip

Post by myasirm »

thx dear i used this code but it only display first 8 characters in the tip but i wnat to display all the characters i have given so how is that possible??
User avatar
turbolemon
Forum Commoner
Posts: 70
Joined: Tue Jul 14, 2009 6:45 am
Location: Preston, UK

Re: tool tip

Post by turbolemon »

The tool-tips on this site are awesome, and CSS based too: http://matthewjamestaylor.com/.
myasirm
Forum Commoner
Posts: 54
Joined: Sat Sep 12, 2009 3:57 am

Re: tool tip

Post by myasirm »

can u plz tell me simple code for that
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: tool tip

Post by onion2k »

myasirm wrote:can u plz tell me simple code for that
Sometimes things just aren't simple. There isn't a 'cheat' or a quick and easy way to do things like CSS tooltips. They're complicated.
User avatar
turbolemon
Forum Commoner
Posts: 70
Joined: Tue Jul 14, 2009 6:45 am
Location: Preston, UK

Re: tool tip

Post by turbolemon »

The guy hasn't posted the code, i'm sure if you Google "CSS tool-tips" you will find something similar.
Post Reply