login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

Background: I have an HTML page which lets you expand ce... only small portions of the page need to be loaded for su... it's done via JavaScript, and not by directing to a new ...
http://example.com/#foobar
and have the "foobar" category be opened imme

Remove fragment in URL with JavaScript w/out causing page reload - Stack Overflow
http://stackoverflow.com/...ent-in-url-with-javascript-w-out-causing-page-reload

Categories

/Channels/techie/JavaScript

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

Background: I have an HTML page which lets you expand certain content. As only small portions of the page need to be loaded for such an expansion, it's done via JavaScript, and not by directing to a new URL/ HTML page. However, as a bonus the user is able to permalink to such expanded sections, i.e. send someone else a URL like

http://example.com/#foobar

and have the "foobar" category be opened immediately for that other user. This works using parent.location.hash = 'foobar', so that part is fine.

HTML

<p><strong>Background:</strong> I have an HTML page which lets you expand certain content. As only small portions of the page need to be loaded for such an expansion, it's done via JavaScript, and not by directing to a new URL/ HTML page. However, as a bonus the user is able to permalink to such expanded sections, i.e. send someone else a URL like</p> <p><em><a href="http://example.com/#foobar" rel="nofollow">http://example.com/#foobar</a></em></p> <p>and have the "foobar" category be opened immediately for that other user. This works using parent.location.hash = 'foobar', so that part is fine.</p>