Jump to content

Displaying events in tool tip


shivam0101

Recommended Posts

Hello,

 

I have a calander which highlights present date and also events dates.  To hightlight the event dates i am using the below code.  The event_date is in the format Y-m-d H:i:s

 

<?php

$event_date = mysql_query(""SELECT SUBSTR(conf_date, 9, 2) AS selected_date, SUBSTR(conf_date, 11, 9) AS selected_time, conf_date_desc FROM conf_hall_status WHERE SUBSTR(`conf_date`, 1,7)='2009-01'');

 

if(mysql_num_rows($event_date) >0)

{

    while($event_date_ret = mysql_fetch_assoc($event_date))

    {

          $date[] = $event_date_ret['event_date'];

          $time[] = $event_date_ret['selected_time'];

    }

}

 

?>

 

in the calander,

 

<?php

  //----------

   

    for($i=0; $i<$month_days; $i++)

    {

      if(in_array($i, $date))

            echo "<tr><td><a href='event.php'>$i</a></td></tr>"; //event date

      else

          echo "<tr><td>$i</td></tr>";

    }

 

//----------

?>

 

I want to display the event date, event time and event description in the tool tip. 

 

  Can someone tell me how to get those details in the tool tip.

 

 

 

The code I am using for tool tip is,

 

<style>

a.info{

    position:relative; /*this is the key*/

    z-index:24; background-color:#ccc;

    color:#000;

    text-decoration:none}

 

a.info:hover{z-index:25; background-color:#ff0}

 

a.info span{display: none}

 

a.info:hover span{ /*the span will display just on :hover state*/

    display:block;

    position:absolute;

    top:2em; left:2em; width:15em;

    border:1px solid #0cf;

    background-color:#cff; color:#000;

    text-align: center}

 

</style>

 

//Usage of the tool tip

 

<a class=info

href="example.html"><b>pure css

popups</b><span> Tool tip </span></a>

 

 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/151758-displaying-events-in-tool-tip/
Share on other sites

Archived

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

×
×
  • Create New...

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.