J
joker197cinque
I have a div (overflow auto) that load an html file.
It is loaded via xmlhttp after a click event on the parent document.
Simple:
var fileName = "/ex.html";
xmlhttp.open("GET", fileName,true);
xmlhttp.onreadystatechange=function() {
mydiv.innerHTML = xmlhttp.responseText;
}
xmlhttp.send(null);
But what about an anchor in ex.html ? I put a named anchor in bottom
part of the ex.html file and I would like the div will scroll exactly
to that point, after the click event.
If I specify "/ex.html#anchor" xmlhttp object raise an error because
it doesn't find the file (correct!).
How can I achieve this ?
Thanks
It is loaded via xmlhttp after a click event on the parent document.
Simple:
var fileName = "/ex.html";
xmlhttp.open("GET", fileName,true);
xmlhttp.onreadystatechange=function() {
mydiv.innerHTML = xmlhttp.responseText;
}
xmlhttp.send(null);
But what about an anchor in ex.html ? I put a named anchor in bottom
part of the ex.html file and I would like the div will scroll exactly
to that point, after the click event.
If I specify "/ex.html#anchor" xmlhttp object raise an error because
it doesn't find the file (correct!).
How can I achieve this ?
Thanks