FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Pls help, onmouseover popup image frm database

 


akoni176
pls help me to implement my desire to have a popup window when the mouse get over a certain text or link and a window display an image from database that corresponds the ID field of a user profile..

thanks in advance...
shamil
akoni176 wrote:
pls help me to implement my desire to have a popup window when the mouse get over a certain text or link and a window display an image from database that corresponds the ID field of a user profile..

thanks in advance...

I prefer onClick not onMouseOver but you are the last one to choose which one. You can use javascript function to open image in new window. It is up to you how to write php file for it. Because i don't know where ur images are located. You can even open the new window in same size with image. To do this use php image functions to get image size.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function popup(url)
{
 window.open(url,null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
</script>
<title>PopUp</title>
</head>

<body>
<a href="#" onmouseover="popup('popup.php?id=1')">Mouse Over This</a>
</body>
</html>
sb3700
What exactly do you mean?

Do you want what shamil is suggesting, which will look something like:
http://javascript.internet.com/page-details/auto-resizable-pop-up.html

or do you want this sort of thing, where a new window isn't actually opened:
http://host.sonspring.com/hoverbox/

or the more fancy version (which involves clicking):
http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm.

All of them explain the source code and usage somewhere on the site (go to http://sonspring.com/journal/hoverbox-image-gallery for the hoverbox).
akoni176
my little probz goes like this,, i have been created a simple memorandum system, or like an email system but it is costumize online a cetain infos. a memo system have an inbox, ect..

in the inbox folder or menu, i have sender, subject, date column. i want a simple scripts that when the user place a mouse pointer in a certain sender, or when the mouseover occur, a popup window appeare with a picture of the sender that cme from the database base on the sender's profile..

thanks a lot ...
varun_dodla
shamil wrote:
akoni176 wrote:
pls help me to implement my desire to have a popup window when the mouse get over a certain text or link and a window display an image from database that corresponds the ID field of a user profile..

thanks in advance...

I prefer onClick not onMouseOver but you are the last one to choose which one. You can use javascript function to open image in new window. It is up to you how to write php file for it. Because i don't know where ur images are located. You can even open the new window in same size with image. To do this use php image functions to get image size.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function popup(url)
{
 window.open(url,null, "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
</script>
<title>PopUp</title>
</head>

<body>
<a href="#" onmouseover="popup('popup.php?id=1')">Mouse Over This</a>
</body>
</html>


What shamil suggests here should do the job for you. If you are using J2EE instead php then your URL in the function call popup() could be a url to any action class.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.