CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Invoke Table Row Link with Inline Style

Print topic Send  topic

Author Message
datadoit.com
Posted: 05/19/2005, 6:52 AM

PHP4; CCS 2.3; MySQL4

Howdy. I'd like to be able to invoke a link on a grid row (not table data),
using something like an 'onmousedown' type of event. Currently, I'm
changing the row's color 'onmouseover':

<!-- BEGIN Row -->
<tr bgcolor="#FFFFFF"
onmouseover="this.style.backgroundColor='#B9C1E9'"
onmouseout="this.style.backgroundColor='#FFFFFF'"; >
<td>{TestID}</td>
<td>{CategoryName}</td>
<td>{Type}</td>
<td>{TestName}</td>
</tr>
<!-- END Row -->

What I'd now like to do is to also change the mouse cursor to a finger, and
when the mouse is clicked on that row, take them to another page with
{TestID} from that row as the URL parameter.

Anyone done this before?

Gracias.

datadoit.com
Posted: 05/19/2005, 7:54 AM

Well, I answered my own question. The result was:

<tr bgcolor="#FFFFFF" style="cursor:pointer;cursor:hand"
onmouseover="this.style.backgroundColor='#B9C1E9'"
onmouseout="this.style.backgroundColor='#FFFFFF'"
onclick="window.location='tests_addedit.php' + location.search + '&TestID='
+ {TestID}" ;>

Had to use the 'cursor:pointer;cursor:hand' method since
'this.style.cursor='hand'' doesn't work in Mozilla.

-MikeR


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.