javascript : faking ajax paging
I'm developing yet another website for my company. It's all set up for nt authentication which unfortunately seems to break AJAX. However, I love the UI abilities of AJAX so I'm trying to work around the no-ajax functionality. It's an intranet so load times are quick so I'm being fairly successful.
Anyway, there's a part that shows news events. The page shows one news event (the most recent) and the has links at the top (<<< and >>>) that scroll to next/previous. Ordinarily I would've used ajax to dynamically load the appropriate article into the page, but since I can't I settled for javascript hiding / unhiding the different articles that were all preloaded.
basically the html looks like this (very simplified obviously)
initially the <<< part has no link and the >>> has a link that invokes a javascript function nextNews(1);
Then here's the javascript:
Anyway, it's nothing earth shattering but I was very happy with it. This works in IE7 and Firefox.