Hi whisher, TY a lot, all problems about this solved!
Now I 've a nother one. The hash I’m passing is like this:
#archive.php?var1=res1&var2=res2
I do all splits correctly, and I obtain all variables correctly renamed as I want, including the archive where we need to call ‘archive.php’ with:
$(“#capaContenedora”).load(archivo);
But, in this archive.php that I normally collect all variables with $_GET is not working collecting the variables from hash. Is the method I’m using correct?
Thank you in advance, and sorry by my english not at all right
Return false disables the navigation to a particular link in order to run the script, thereby you’re going to encounter the issue of no hash in the address bar, a better method would be to examine the hash using “var hash = location.hash.substr(1);” (in your JavaScript file) to get the hash value when it changes and then do whatever you need as and when the hash matches the value you want. Much less obtrusive and it should do the job perfectly!
I’ve a doubt now collecting the hash. I use in function hash.js this code:
$(document).ready(function(){
//obtain the hash
var jash = window.location.hash;
// if it is valid
if(jash.length > 1){
// if it exists, we look for the title attribute
var href = $("a[@href="+jash+"]").attr("title");
// we load the page
$("#capaContenedora").load(href);
}
});
This line is not working I think, because I’m placing some alerts and the variable href doesn’t exist: var href = $(“a[@href=”+jash"]").attr(“title”);