locked
Changing colors in one of the columns of the list RRS feed

  • Question

  • I have a SharePoint, that has a list as one of the components.

     

    I want one of the columns of the list to change colors depending on the value. I want to embed a Javascript to make it do that.

     

    My question is - where do I embed Javascript ? The list is showing on the homepage, and it also has a link on the left, that opens a new page just for that list.

     

    Where do I enter the Javascript ?

     

    Thanks!

    Wednesday, January 2, 2008 2:27 PM

Answers

  • In this case you would have to embed the Javascript in those two pages.

     

    Fyi: this can be done pretty easy by making use of the SharePoint Designer tool; this tool will allow you to make use of conditional formatting (directly in the XSL) so you don't have to write the Javascript yourself.

     

    If you want to have a more professional (and repeatable) solution, you can also create a custom field type (completely in code).

     

    Regards,

    Jan

    http://weblogs.asp.net/jan

     

    Monday, January 7, 2008 9:20 AM

All replies

  • In this case you would have to embed the Javascript in those two pages.

     

    Fyi: this can be done pretty easy by making use of the SharePoint Designer tool; this tool will allow you to make use of conditional formatting (directly in the XSL) so you don't have to write the Javascript yourself.

     

    If you want to have a more professional (and repeatable) solution, you can also create a custom field type (completely in code).

     

    Regards,

    Jan

    http://weblogs.asp.net/jan

     

    Monday, January 7, 2008 9:20 AM
  • Jan,
    I'm interested in getting some more information on your response to the question.  How do create a customer field type (completely in code)?
    Ben
    Monday, July 27, 2009 4:40 PM