Jump to content

Mouseover Select Row


_spaz

Recommended Posts

I think I'm in the right area, i was told that AJAX was the better option for what I want to do but I have no idea on how to implement it.  I have a table of data that is retrieved from MYSQL with PHP and want to b able to do a mouseover event that highlights a row and then be able to select it if I press the mouse button.  Can someone pls point me in the right direction?

 

   

 

// Execute the query

$result = mysql_query( $query );

if (!$result)

{

  die ("Could not query the database:

<br />". mysql_error());

}

?>

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>Untitled Document</title>

<style type="text/css">

<!--

.tabledetail {

border-top-width: thin;

border-right-width: thin;

border-bottom-width: thin;

border-left-width: thin;

border-top-style: solid;

border-right-style: solid;

border-bottom-style: solid;

border-left-style: solid;

}

-->

</style>

<link href="bluedream.css" rel="stylesheet" type="text/css">

</head>

 

<body>

<p>Assets Detail:</p>

<div align="center">

<table width="200" border="1">

 

  <tr>

    <th scope="col"> Asset ID</th>

    <th scope="col"> Filename</th>

    <th scope="col"> Create Time</th>

    <th scope="col"> Job Start Time</th>

    <th scope="col"> Job End Time</th>

    <th scope="col">Complete %</th>

    <th scope="col">Job_Name</th>

    <th scope="col">First Alert Found</th>

    <th scope="col">Status</th>

</tr>

<?php while ($result_row = mysql_fetch_row(($result))){ ?>

<tr>

<td><?php echo $result_row[0]; ?></td> 

<td><?php echo $result_row[1]; ?></td>

<td><?php echo $result_row[2]; ?></td>

<td><?php echo $result_row[3]; ?></td>

<td><?php echo $result_row[4]; ?></td>

<td><?php echo $result_row[5]; ?></td>

<td><?php echo $result_row[6]; ?></td>

<td><?php echo $result_row[7]; ?></td>

 

<?php  if ($result_row[3] <= "" and $result_row[7] <= "") {

 

  echo "<td><font color=\"red\">" . "Incomplete/Aborted" ."</font></td>";

  }

  elseif ($result_row[3] >= "" and $result_row[7] <= "") {

echo "<td><font color=\"green\">" . "Passed" ."</font></td>";

  }

  elseif ($result_row[7] >= ""){

  echo "<td>" . $result_row[8] . "</td>";

  }

?>

 

</tr>

<?php } ?>

</div>

</table>

 

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.