subhailc
09-02-2008, 07:17 AM
hi,
if i use an interval to poll window.location properties (href, hash or search), both IE and FF give accurate returns initially.
using named anchors, the poll returns accurately in both.
HOWEVER, if i navigate amongst the anchors and then use back/forward buttons - the address bar updates appropriately in both browsers, and the poll returns correctly in FF, but in IE it gives only the url of the last anchor manually clicked.
e.g.,
<html>
<head>
<script>
function update(){
document.getElementById("statustext").value = window.location.href;
};
window.onload = function(){
setInterval(update,1000);
};
</script>
</head>
<body>
<input id="statustext" />
<a href="#1">1</a>
<a href="#2">2</a>
<a href="#3">3</a>
<a name="1"></a>
<a name="2"></a>
<a name="3"></a>
</body>
</html>
everything works fine EXCEPT in IE when back/forward buttons are clicked. the status won't change. in FF it works fine.
is there a workaround?
tyia
if i use an interval to poll window.location properties (href, hash or search), both IE and FF give accurate returns initially.
using named anchors, the poll returns accurately in both.
HOWEVER, if i navigate amongst the anchors and then use back/forward buttons - the address bar updates appropriately in both browsers, and the poll returns correctly in FF, but in IE it gives only the url of the last anchor manually clicked.
e.g.,
<html>
<head>
<script>
function update(){
document.getElementById("statustext").value = window.location.href;
};
window.onload = function(){
setInterval(update,1000);
};
</script>
</head>
<body>
<input id="statustext" />
<a href="#1">1</a>
<a href="#2">2</a>
<a href="#3">3</a>
<a name="1"></a>
<a name="2"></a>
<a name="3"></a>
</body>
</html>
everything works fine EXCEPT in IE when back/forward buttons are clicked. the status won't change. in FF it works fine.
is there a workaround?
tyia