CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Highlight table row

Print topic Send  topic

Author Message
jonathanf

Posts: 3
Posted: 03/03/2004, 1:43 AM

Hello all

I was wondering if anyone could help with with a small problem.

On my page I have an editable grid with a custom update.
Each row contains a link. When the user clicks a link, a variable is added to the URL of the page, i.e. http://localhost/blah.php becomes http://localhost/blah.php?whatever=1.

Is there a way I can highlight that table row when the user clicks on a link.

I have tried using javascript and "OnClick" tags in the <tr> tag of the appropriate table but nothing seems to happen.

I hope this makes sense, any suggestions?

Thanks


_________________
-- JONATHAN FREEDMAN
Jonathan.Freedman@Orange.net
View profile  Send private message
lvalverdeb

Posts: 299
Posted: 03/03/2004, 7:00 AM

Try the onMouseOver and onMouseOut events inside your TR tags.
for example:
  
<tr onMouseOver="this.bgColor = '#C0C0C0'"  
    onMouseOut ="this.bgColor = '#FFFFFF'"  
    bgcolor="#FFFFFF">  
<td align=right>11111</td>  
<td align=right>ABCDEF</td>  
</tr>  

Luis

_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4
View profile  Send private message
jonathanf

Posts: 3
Posted: 03/03/2004, 9:17 AM

Thanks for that Luis, this doesn't seem to be working, nothing happens at all. I am not sure if i'm missing something that should be obvious to me.

Here is a code snippet from my page if this helps.

<tr onMouseOver="this.bgColor = '#C0C0C0' "
onMouseOut ="this.bgColor = '#FFFFFF' "
bgcolor="#FFFFFF">
<td class="KnockoutDataTD"><a href="{firstname_Src}" class="KnockoutDataLink">{firstname}</a> </td>
<td class="KnockoutDataTD"><a href="{lastname_Src}" class="KnockoutDataLink">{lastname}</a> </td>
</tr>

_________________
-- JONATHAN FREEDMAN
Jonathan.Freedman@Orange.net
View profile  Send private message
martin
Posted: 03/05/2004, 12:02 AM

Hello.
If you have an class=KnockoutDataTD in your <td> it will not happend.
Delete the (class="KnockoutDataTD").

By, martin
jonathanf

Posts: 3
Posted: 03/05/2004, 2:42 AM

Thanks martin, that got it.

Now for a really annoying question... anyone know how I can make the highlighted row persist a page reload? So that after the user clicks the link in the table and reloads the page the same row will still be highlighted?

Jonathan
_________________
-- JONATHAN FREEDMAN
Jonathan.Freedman@Orange.net
View profile  Send private message
DonB
Posted: 03/05/2004, 5:39 AM

You will have to maintain "state" somehow, so the reloaded page knows what
the previous page was like. This can be as simple as adding a query
parameter (e.g., &hilight=2) onto the URL to indicate the row that should be
hightlighted.

--
DonB

http://www.gotodon.com/ccbth


"jonathanf" <jonathanf@forum.codecharge> wrote in message
news:54048599d1215c@news.codecharge.com...
> Thanks martin, that got it.
>
> Now for a really annoying question... anyone know how I can make the
highlighted row persist a page reload? So that after the user clicks the
link in the table and reloads the page the same row will still be
highlighted?
>
> Jonathan
> _________________
> -- Jonathan
>Jonathan.Freedman@Orange.net
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

martin
Posted: 03/06/2004, 1:14 AM

Hello.
Look hear for Highlight search results.
http://www.gotocode.com/art.asp?art_id=113&

By,
martin

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.