Re: How best to highlight an an item...




"dorayme" <doraymeRidThis@xxxxxxxxxxxxxxx> wrote in message
news:doraymeRidThis-4F2D6C.18120421082007@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I will be soon making up a page with a table of items. There will
be a fair few rows. All not high, all tabular.

People will be referencing parts of it via links that latch onto
ids that will be placed on the <tr>s. But while this will narrow
things down for folk, they will still see a whole lot of other
stuff depending on the vertical size of their browser window. I
was rather hoping there might be a neat way of also highlighting
the row concerned, not necessarily literally the row, but
something to mark it out as the one to be attended to. Need no
help with the actual css, more with how to let the browser or
server know which row needs the style.

Can't think of any normal html/css way of doing this. Not
particularly keen on a js way ...though I might consider it as it
is sort of an extra bit of help and not fundamentally bad if
anyone has it turned off.

Anyone know of a php way perhaps? Do I have to go to alt.php. or
alt.js.

Can't I please just stay here? I like it here in spite of my bad
treatment.

I am reminded of that php stuff that I have used to stick in an
id="current" on some list items depending on the html file being
accessed. Perhaps it will all be clear by morning. But if anyone
knows the way to go without blinding me with science... please,
do spill the beans. <g>

I do something similar in a CMS. There is a table of, say, pages. One of
those pages will be the current one being actioned (deleted, renamed, edited
or whatever).

// $arr is an array of rows from the database.
// $current is the index into this array of the page being actioned.
for ($i = 0;$i < count($arr);$i++)
{
echo '<tr';
if ($i == $current)
{
echo " class='current'";
}
// optional if you want rows coloured alternatively. Easier to read.
else if ($i % 2)
{
echo "class='odd'";
}
echo ">\r\n";
// echo a <td> for each field in the row
echo "</tr>\r\n";
}

Flavour 'current' and 'odd' to taste, probably using background colour.

--
Richard.


.



Relevant Pages

  • Re: How best to highlight an an item...
    ... stuff depending on the vertical size of their browser window. ... Anyone know of a php way perhaps? ... id="current" on some list items depending on the html file being ... I've never done it but according to "CSS Cookbook" by Christopher Schmitt, ...
    (alt.html)
  • How best to highlight an an item...
    ... All not high, all tabular. ... stuff depending on the vertical size of their browser window. ... Anyone know of a php way perhaps? ... id="current" on some list items depending on the html file being ...
    (alt.html)
  • Re: How best to highlight an an item...
    ... But while this will narrow things down for folk, they will still see a whole lot of other stuff depending on the vertical size of their browser window. ... Need no help with the actual css, more with how to let the browser or server know which row needs the style. ... I am reminded of that php stuff that I have used to stick in an id="current" on some list items depending on the html file being accessed. ...
    (alt.html)
  • Re: Need help on PHP for MPE/ix
    ... Here is the syntax of the dbupdate intrinsic in PHP: ... assoc array of item values) ... Please let me know if you have any more suggesstions to solve this problem. ... Pavan Kumar Rati wrote: ...
    (comp.sys.hp.mpe)
  • Re: Using a RegEx as a "variable" WITHIN an array?
    ... believe the PHP one is also based upon. ... combination of 1 or more numerics in this instance would give you your ... add this to your array - you could then do a pattern match on the array ... > Dim selCriteria as String ...
    (microsoft.public.dotnet.framework.aspnet)