Search code examples
javascriptjquerysharepointweb-parts

SharePoint 2010 auction page in Javascript misbehaving


I need to build an auction site on SharePoint 2010 at work. Our team came across this webpage about posting this javascript into a web part:

http://weblogs.asp.net/bsimser/archive/2009/10/09/calculated-time-left-columns-in-sharepoint-with-jquery.aspx

And it has exactly what we are needing but the javascript only works on SharePoint 2007. The script requires the fields Title to hold the item, End Date just to have a reference for the Time Left field, and the Time Left field is suppossed to countdown from the current time until the auction's End Date.

What is the difference betweeen the two versions that's causing the javascript not to work correctly and how can i modify this to work for us? Thanks for any help.


Solution

  • The error is most likely around when var dArray is being defined. The jQuery code is looking for very specific columns and 2007 and 2010 build their tables slightly differently. It would also depend on what columns you view has listed. If you use Firebug you should be able to drill down to the proper columns that has your end date so that the rest of the code would work.