Okay I\'m using jQuery and currently getting max value of scrollbar doing this:
var $body = $(\'body\'); $body.scrollLeft(99999); // will give me the max val
You can calculate the maximum value of element.scrollLeft with:
element.scrollLeft
var maxScrollLeft = element.scrollWidth - element.clientWidth;
Note that there could be some browser specific quirks that I'm not aware of.