thecard Posted November 28, 2008 Share Posted November 28, 2008 I want to be able to pass values after the # in a URL like: www.whatever.com#variablevalue Thanks. Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/ Share on other sites More sharing options...
rhodesa Posted November 29, 2008 Share Posted November 29, 2008 can you elaborate? are you saying you want javascript to be able to read the # info from the url? you have to parse it out of the window.location.href Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/#findComment-701386 Share on other sites More sharing options...
xtopolis Posted November 29, 2008 Share Posted November 29, 2008 It refers to page anchors. Page anchors appear within the page as method of scrolling the browser to that point. [when available] www.page.com/#main <a name="main"> </a> Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/#findComment-701579 Share on other sites More sharing options...
thecard Posted November 29, 2008 Author Share Posted November 29, 2008 Thanks, that all makes sense. Dunno why I didn't think of that before. Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/#findComment-701598 Share on other sites More sharing options...
corbin Posted November 29, 2008 Share Posted November 29, 2008 window.location.hash gives you the stuff only after # if I remember correctly. Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/#findComment-701757 Share on other sites More sharing options...
thecard Posted November 29, 2008 Author Share Posted November 29, 2008 Oooo nice. Should save me time although I already did it all with substr . Link to comment https://forums.phpfreaks.com/topic/134694-solved-whats-the-in-the-url-called-and-how-can-i-use-it-to-pass-values/#findComment-701801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.