Page 1 of 1

tool tip

Posted: Sat Sep 12, 2009 3:59 am
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

Re: tool tip

Posted: Sat Sep 12, 2009 4:07 am
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>
 

Re: tool tip

Posted: Mon Sep 14, 2009 4:10 am
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??

Re: tool tip

Posted: Mon Sep 14, 2009 4:18 am
by turbolemon
The tool-tips on this site are awesome, and CSS based too: http://matthewjamestaylor.com/.

Re: tool tip

Posted: Mon Sep 14, 2009 4:37 am
by myasirm
can u plz tell me simple code for that

Re: tool tip

Posted: Mon Sep 14, 2009 5:08 am
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.

Re: tool tip

Posted: Mon Sep 14, 2009 5:17 am
by turbolemon
The guy hasn't posted the code, i'm sure if you Google "CSS tool-tips" you will find something similar.