highlight table row

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

highlight table row

Mark Schneider
from past thread I found easy snippet to
alternate color of table row on found set of records
<TR BGCOLOR="[if: (loop_count % 2) == 0]#000000[else]#999999[/if]">
[thanks fletcher]

BUT
is there a way (via CSS or JS) which would highlight
the entire table row with an alternate color when
you mouseover it?

I saw similar to this at maccentral.com after a search
but could not figure out how to reverse engineer to work
with my lasso returned [records]

would be an interesting alternative to
simply alternating of row colors.

any ideas?
schnide



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: highlight table row

Fredrik Norell
This should work.

<tr onMouseover="this.bgColor='#0099CC'" onMouseout="this.bgColor='#FFFFFF'">

/Fredrik


>from past thread I found easy snippet to
>alternate color of table row on found set of records
><TR BGCOLOR="[if: (loop_count % 2) == 0]#000000[else]#999999[/if]">
>[thanks fletcher]
>
>BUT
>is there a way (via CSS or JS) which would highlight
>the entire table row with an alternate color when
>you mouseover it?
>
>I saw similar to this at maccentral.com after a search
>but could not figure out how to reverse engineer to work
>with my lasso returned [records]
>
>would be an interesting alternative to
>simply alternating of row colors.
>
>any ideas?
>schnide
>

--
----------------------------
Besök gärna vår sajt! http://www.totdigital.com
----------------------------
fredrik norell
t&t digital
tel: 044-20 46 90
mobil: 0708-91 91 30
fax: 044-20 46 29
mail: [hidden email]
----------------------------
Besöksadress:
Spannmålsgatan 11
Kristianstad
----------------------------
Postadress
Box 289
291 23 Kristianstad


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: highlight table row

Mark Schneider
In reply to this post by Mark Schneider
That worked GREAT!
and it was so easy even I could do it ;-)
Thanks!
schnide

> This should work.
>
> <tr onMouseover="this.bgColor='#0099CC'"
> onMouseout="this.bgColor='#FFFFFF'">
>
> /Fredrik
>
>
> >from past thread I found easy snippet to
> >alternate color of table row on found set of records
> ><TR BGCOLOR="[if: (loop_count % 2) == 0]#000000[else]#999999[/if]">
> >[thanks fletcher]
> >
> >BUT
> >is there a way (via CSS or JS) which would highlight
> >the entire table row with an alternate color when
> >you mouseover it?
> >
> >I saw similar to this at maccentral.com after a search
> >but could not figure out how to reverse engineer to work
> >with my lasso returned [records]
> >
> >would be an interesting alternative to
> >simply alternating of row colors.
> >
> >any ideas?
> >schnide
> >



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: highlight table row

Greg Hemphill
In reply to this post by Mark Schneider
Schnide


This example uses two CSS classes OddRow and EvenRow - where OddRow is
a light gray background and EvenRow is a white background.  In the
Lasso/html side of things we use a variable called vRow to determine
which class to use for each row (OddRow or EvenRow).  Every time the
record loops there is an if statement which switches the value used for
vRow for the new record loop.


CSS (usually in an external CSS file):

/* Green Bar */
.OddRow { background: #eee; }
tr.OddRow td { padding: 5px; }
.EvenRow { background: #fff; }
tr.EvenRow td { padding: 5px; }




Lasso/html stuff:

[var: 'vRow'='OddRow']

<table class="HitList">
        <tr class="HeaderRow">
                <td>Name</td>
                <td>Phone Number</td>
        </tr>
        [records]
                <tr class="[$vRow]">
                        <td>[field: 'Name']</td>
                        <td>[field: 'PhoneNumber']</td>
                </tr>
                [if: ($vRow)=='OddRow'][var: 'vRow'='EvenRow'][else][var:
'vRow'='OddRow'][/if]
        [/records]
</table>



On May 23, 2005, at 7:57 AM, Mark Schneider wrote:

> from past thread I found easy snippet to
> alternate color of table row on found set of records
> <TR BGCOLOR="[if: (loop_count % 2) == 0]#000000[else]#999999[/if]">
> [thanks fletcher]
>
> BUT
> is there a way (via CSS or JS) which would highlight
> the entire table row with an alternate color when
> you mouseover it?
>
> I saw similar to this at maccentral.com after a search
> but could not figure out how to reverse engineer to work
> with my lasso returned [records]
>
> would be an interesting alternative to
> simply alternating of row colors.
>
> any ideas?
> schnide
>
>
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>
>
---------------------------------
    Greg Hemphill
    VP of Development
    Webstop.com, Inc.
---------------------------------
    Company: http://www.Webstop.com
    Personal: http://www.MrGHemp.com
    Email: [hidden email]
    AIM: MrGHemp
    Office: 727.942.2797
    Fax: 727.938.2347
    Mobile: 727.692.6886
---------------------------------


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: highlight table row

Greg Hemphill
In reply to this post by Mark Schneider
oops I just realized you said mouse over it...  forget my last message
then

On May 23, 2005, at 7:57 AM, Mark Schneider wrote:

> from past thread I found easy snippet to
> alternate color of table row on found set of records
> <TR BGCOLOR="[if: (loop_count % 2) == 0]#000000[else]#999999[/if]">
> [thanks fletcher]
>
> BUT
> is there a way (via CSS or JS) which would highlight
> the entire table row with an alternate color when
> you mouseover it?
>
> I saw similar to this at maccentral.com after a search
> but could not figure out how to reverse engineer to work
> with my lasso returned [records]
>
> would be an interesting alternative to
> simply alternating of row colors.
>
> any ideas?
> schnide
>
>
>
> --
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>
>
---------------------------------
    Greg Hemphill
    VP of Development
    Webstop.com, Inc.
---------------------------------
    Company: http://www.Webstop.com
    Personal: http://www.MrGHemp.com
    Email: [hidden email]
    AIM: MrGHemp
    Office: 727.942.2797
    Fax: 727.938.2347
    Mobile: 727.692.6886
---------------------------------


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage