Taking the dirt away V
That was kind of a strange request for M. I'm not the kind of visitor who uses the back button, because I understand web-site must provide enough links to navigate around apart from the browser possibilities. Maybe its because I belong to the Flash generation, who knows.
The solution has appeared. Real hackers had been last weeks trying to solve this inconvenient making suitable the profits of Ajax tech.
You must have a look at this:
First Step
function PageLocator(propertyToUse, dividingCharacter) {
this.propertyToUse = propertyToUse;
this.defaultQS = 1;
this.dividingCharacter = dividingCharacter;
}
PageLocator.prototype.getLocation = function() {
return eval(this.propertyToUse);
}
PageLocator.prototype.getHash = function() {
var url = this.getLocation();
if(url.indexOf(this.dividingCharacter)>-1) {
var url_elements = url.split(this.dividingCharacter);
return url_elements[url_elements.length-1];
} else {
return this.defaultQS;
}
}
PageLocator.prototype.getHref = function() {
var url = this.getLocation();
var url_elements = url.split(this.dividingCharacter);
return url_elements[0];
}
PageLocator.prototype.makeNewLocation = function(new_qs) {
return this.getHref() + this.dividingCharacter + new_qs;
}Second step
function setContent(new_content) {
if(!document.getElementById ||
=> !document.getElementsByTagName) return;
var container = document.getElementById("content");
container.innerHTML = new_content;
}Next steps
Okay, you get me. code is not mine. I borrowed - as always - from Mike Stenhouse. He does not know me, but who cares.
Being honest, let me say you something. Make click and visit this place where he explains easily and clear his solution to this hypothetic headache.
Not forgetting Robert Penner get the solution years ago concerning ActionScript and Flash apps.
Take care.

