Hover with php

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
xionhack
Forum Contributor
Posts: 100
Joined: Mon Nov 10, 2008 9:22 pm

Hover with php

Post by xionhack »

Hello. I want to write some code that when I hover a name with the mouse, will show a little box where it will show the name, picture, birth date and other data from a database. What I dont know how to do is the hover. I dont know javascript. How can I do it, anybody knows about some extensions that I can use? Thanks!
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Hover with php

Post by Benjamin »

Javascript :)
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Hover with php

Post by omniuni »

You'll need to create a div that is visibility:hidden where you want it to appear. then, use javascript to reset the visibility. alternatively, you can get fancy, and use innerhtml to replace the contents of the div by calling a php script, but that may be overkill. :)
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Hover with php

Post by Jonah Bron »

Why not just use the HTML title attribute?
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Hover with php

Post by omniuni »

The title attribute has a history of inconsistent display between browsers.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: Hover with php

Post by Jonah Bron »

Oh. :o
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Hover with php

Post by pickle »

This is client-side. Moving to the appropriate forum.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply