how to add a color to a line in sharepoint 2007 list that has a specific text ?

Posted by gadym on Stack Overflow See other posts from Stack Overflow or by gadym
Published on 2010-03-11T10:23:53Z Indexed on 2010/03/12 6:27 UTC
Read the original article Hit count: 213

Filed under:
|
|
|
|

hello there,

I would like to know how to add a color to a line in sharepoint 2007 list if in one field there is a specific text contained ?

for example : I have a list that have three fields:

list1

1.id 2.name 3.full description

now i want to show only the first and the second field to the user.

list1

id name


1 abc 2 edv

second thing, i want to give a color (let say red) to a row that contains in the hidden field - "full description", a text with the word for example 'color'.

I found a javascript code that i can add to the aspx page :

(document).ready(function(){ $Text = $("td .ms-vb2:contains('color')"); $Text.parent().css("background-color", "red"); });

but it's only works if the the "full description" is shown.

can someone give me an idea ?

thanks, gadym

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about 2007