Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Javascript only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
Javascript
anchors and window.history
Collapse
This topic is closed.
X
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Timo
#1
anchors and window.history
Jul 23 '05, 03:48 PM
Is there any way to jump to an anchor in the current document without
affecting window.history?
Thanks
Rob B
#2
Jul 23 '05, 03:55 PM
Re: anchors and window.history
Timo wrote:
[color=blue]
> Is there any way to jump to an anchor in the current document without
> affecting window.history?[/color]
Umm...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled </title>
<style type="text/css">
.filler {
height: 800px;
background: steelblue;
}
a {
display: block;
}
</style>
<script type="text/javascript">
//<![CDATA[
var hasher = function(url)
{
top.location.re place(url);
return false;
}
//]]>
</script>
</head>
<body>
<a href="#section1 " onclick="return hasher(this.has h)">Section 1</a>
<a href="#section2 " onclick="return hasher(this.has h)">Section 2</a>
<a href="#section3 " onclick="return hasher(this.has h)">Section 3</a>
<div class="filler"> </div>
<h4 id="section1">S ection 1<a href="#" onclick="return
hasher(this.has h)">top</a></h4>
<div class="filler"> </div>
<h4 id="section2">S ection 2<a href="#" onclick="return
hasher(this.has h)">top</a></h4>
<div class="filler"> </div>
<h4 id="section3">S ection 3<a href="#" onclick="return
hasher(this.has h)">top</a></h4>
<div class="filler"> </div>
</body>
</html>
*** Sent via Developersdex
http://www.developersdex.com
***
Don't just participate in USENET...get rewarded for it!
Comment
Post
Cancel
Timo
#3
Jul 23 '05, 03:59 PM
Re: anchors and window.history
Thanks for the suggestions!
Timo
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment