Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add # to URL useing javascript insted of <a href='#'>

Status
Not open for further replies.

NateBro

Programmer
Sep 1, 2004
233
US
hey, thanks for your time, but i was wondering if there was a way to apend a # to a pages URL without reloading the page.

basicly i would like this..
Code:
window.location = window.location + "#myMark";
but WITH OUT reloading the page.

any ideas?

I'm useing this on my website, and i have a main page with a lot of images and javascript so to save time, i have it where the main page loads only once, and i load the text into the existing page. in doing so the URL never changes, so i would like to add something to the URL so a person can copy and past the URL and go to the exact page thay had seen before.


i hope this makes sence, thanks agin for time,
~Nate_Bro





 
Man, do i feel like an idiot! I'm sorry, dumb question, it worked perfectly, thanks

~Nate_Bro
 
There was nothing dumb about that question, I've seen way way worse.

[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top