|
Q594 Is there a way to unconditionally direct the browser to an anchor tag?
irt.org | Knowledge Base | JavaScript | Link | Q594 [ previous next ]
Q594 Is there a way to unconditionally direct the browser to an anchor tag?
Try:
<html>
<head>
<script language="JavaScript"><!--
function relocate(hash) {
if (location.hash != hash) {
if (document.images)
location.replace('http://www.somewhere.com/page.htm#' + hash);
else
location.href = 'http://www.somewhere.com/page.htm#' + hash;
}
}
//--></script>
</head>
<body onLoad="relocate('myAnchor')">
....
<a name="myAnchor"></a>
</body>
</html>
|
Feedback on 'Q594 Is there a way to unconditionally direct the browser to an anchor tag?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.