24 Dec 2008

Bob is great

So, my friend Bob Tarling is great. Yes, he's great. Why? Because he fixed the back button on my website!!!!!!!!!!!! hurrrrrrrrrrrrrrraaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhh!
The problem was that if you looked at the details of an item, say a ring, and then wanted to go back to the main list of items, e.g. rings, it always went back to the beginning of the list. NOT where you already were on the list. This made looking through the items somewhat annoying.
It turned out to be a rather tricky issue to fix - not least because it required Javascript tweaking, and I don't really know Javascript, I know HTML. Anyway....just so you can be impressed at Bob, here's a piece of the code that sorted it in the end:

if (page > 0) {
var previousPage = currentPage - 1;
document.getElementById("previous").innerHTML = '';
} else {
document.getElementById("previous").innerHTML = '';
}
var nextPage = currentPage + 1;
if (totalPics > nextPage * picsPerPage) {
document.getElementById("next").innerHTML = '';
} else {
document.getElementById("next").innerHTML = '';
}

Oh YES, read it and be impressed!! or confused, whichever. Keeping in mind that Bob's main thing is not Javascript, that's just one of his many nerd hobbies! (He also has non-nerd hobbies!)
So, anyone out there who wants to offer Bob a job paying loads, please contact me!

End result: browsing my website just got a lot easier!!!!!!!!!!! :-)

No comments: