Jump to content

Archived

This topic is now archived and is closed to further replies.

valentin

Can I?

Recommended Posts

Can I write in PHP a function similar to onmouseover. For example I have an image and I want to show a small dialog box (in which I should be able to write "this is my image") whenever the mouse is over it. I have seen this done with javascript, but I don't know this script, yet. That is why I am asking you if it can be done only with PHP (HTML).
Thank you in anticipation!

Share this post


Link to post
Share on other sites
I don't think it can be done with php...

Share this post


Link to post
Share on other sites
I'm sure it can't be done.  What you're looking for is browser behaviour that occurs on the client machine, whereas php executes only on the server and then sends the results to the browser.

The standard html attributes title and alt work with images. Simple is best.

Share this post


Link to post
Share on other sites
You wont be able to do this PHP alone, but with AJAX you will be able to. AJAX allows to to use Javascript with PHP. There are a few ajax tutorials over at http://www.ajaxfreaks.com to understand how to use AJAX

Share this post


Link to post
Share on other sites
You can also check out Sweet Titles at http://www.dustindiaz.com/download/ it basically takes whatever you have in the title atribute of a link or image and displays a nice little box.

-Chris

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.