Jump to content

[SOLVED] Help with Overlib - unable to setup


snteran

Recommended Posts

I am trying to implement some pop up windows for our ticket system.  I wanted to be able to show the description of a ticket in a tooltip area from the database.  When you do a search you only see the ticket number, date created and user and wanted to show the description in a pop to show what is in the ticket.  I'm trying to use Overlib by  Erik Bosrup

 

Here is the code for the DB queries:

switch($search)
{
case 'category' :
$query_asset_details="SELECT itc_tickets.ticket_nbr, itc_tickets.ticket_status, itc_tickets.ticket_category, itc_tickets.ticket_priority, itc_tickets.issued_by, itc_tickets.assigned_to, itc_tickets.lastupdt_date, itc_tickets.create_date, itc_tickets.description FROM itc_tickets, itc_priority_listing, itc_status_listing WHERE itc_tickets.ticket_category = '$category' AND itc_tickets.ticket_priority = itc_priority_listing.priority_name AND itc_tickets.ticket_status = itc_status_listing.status_name ORDER BY itc_status_listing.status_level ASC, itc_tickets.create_date DESC, itc_priority_listing.priority_level ASC, itc_tickets.ticket_nbr ASC";
break;
case 'keyword' :
$query_asset_details="SELECT itc_tickets.ticket_nbr, itc_tickets.ticket_status, itc_tickets.ticket_category, itc_tickets.ticket_priority, itc_tickets.issued_by, itc_tickets.assigned_to, itc_tickets.lastupdt_date, itc_tickets.create_date FROM itc_tickets, itc_priority_listing, itc_status_listing WHERE itc_tickets.description LIKE $val AND itc_tickets.ticket_priority = itc_priority_listing.priority_name AND itc_tickets.ticket_status = itc_status_listing.status_name ORDER BY itc_status_listing.status_level ASC, itc_tickets.create_date DESC, itc_priority_listing.priority_level ASC, itc_tickets.ticket_nbr ASC";
if($result = mysql_query($query_asset_details)){
    if(mysql_num_rows($result) > 0){
        break;
    }else{
        $query_asset_details="SELECT itc_tickets.ticket_nbr, itc_tickets.ticket_status, itc_tickets.ticket_category, itc_tickets.ticket_priority, itc_tickets.issued_by, itc_tickets.assigned_to, itc_tickets.lastupdt_date, itc_tickets.create_date, itc_tickets.description FROM itc_tickets, itc_priority_listing, itc_status_listing, itc_tickets_notes WHERE itc_tickets_notes.notes_body LIKE $val AND itc_tickets.ticket_nbr = itc_tickets_notes.ticket_nbr AND itc_tickets.ticket_priority = itc_priority_listing.priority_name AND itc_tickets.ticket_status = itc_status_listing.status_name ORDER BY itc_status_listing.status_level ASC, itc_tickets.create_date DESC, itc_priority_listing.priority_level ASC, itc_tickets.ticket_nbr ASC";
    }
} 
break;
case 'user':
// The below query is for user searches
$query_asset_details="SELECT itc_tickets.ticket_nbr, itc_tickets.ticket_status, itc_tickets.ticket_category, itc_tickets.ticket_priority, itc_tickets.issued_by, itc_tickets.assigned_to, itc_tickets.lastupdt_date, itc_tickets.create_date, itc_tickets.description FROM itc_tickets, itc_priority_listing, itc_status_listing WHERE itc_tickets.issued_by LIKE '$user' AND itc_tickets.ticket_priority = itc_priority_listing.priority_name AND itc_tickets.ticket_status = itc_status_listing.status_name ORDER BY itc_status_listing.status_level ASC, itc_tickets.create_date DESC, itc_priority_listing.priority_level ASC, itc_tickets.ticket_nbr ASC";
break;
}
$asset_details = mysql_query($query_asset_details, $itc_admin) or die(mysql_error());
$row_asset_details = mysql_fetch_assoc($asset_details);
if (!$row_asset_details) {
   // Do something when data wasn't found
   $errorMessage .="No tickets found for that search criteria.<br>";
   include 'search.php'; // Show the form again!
   exit;
}
$totalRows_asset_details = mysql_num_rows($asset_details);

 

Then I have added my information in the <header> section and then right after the <body> tag.

<script type="text/javascript" src="../includes/overlib.js"></script>

 

and :

<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>

 

And here is the mouseover code -

 

<td><a href="javascript:void(0);" onmouseover="return overlib('<?php echo $row_asset_details['description']?>');" onmouseout="return nd();"><div align="center"><?php echo $row_asset_details['ticket_nbr']; ?></div></a></td>

 

I do get the page to load but the pop up does not appear.  I have checked the src link and it is correct, I put an image in the folder and was able to display the photo using the same src link.

 

Thanks,

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.