Forum Moderators: coopster

Message Too Old, No Replies

getting id to file on mouse over

         

hanyaz

3:03 pm on Mar 3, 2009 (gmt 0)

10+ Year Member



Hello,
I am using a javascript allowing me to display links details in a window on mouse over.
I have the file index.php where all the links are located
-link1
-link2
-...

I have a second page called description.php where the link details should appear.
This file should get this info when the user put the mouseover on a link and display it.

So in the href i got onmouseover="ajax_showTooltip('description.php?id=$id ,this,2);return false"

What can i do in the description.php file to get the right id and display the details ?
Thanks for help
Hanyaz

enigma1

12:10 pm on Mar 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your ajax_showTooltip function is setup properly in the description.php script you can get the /GET parameters and use them to setup the page content.

So in this case by simply retrieving the id
$id = (int)$_GET['id']
// database query
// select content from table where id=$id
echo $content;