Results 1 to 2 of 2
-
September 4th, 2008, 10:32 AM #1439Registered User
postsif window location contains text/parameter...
hi guys,
I'm working on a script where I need to get some information from the url...I've used 'location.href' etc..but i'm not getting anywhere at the moment (does it matter if the js file is external?).
But anyway, basically I need to extract the #info from my url i.e. www.example.com/#info. and if (location.href contains == #info) { function1(); } etc...
sorry I bet sounds really confusing...But if you can help in anyway that would be great.
cheerswhile ( ! ( succeed = try() ) );
-
September 4th, 2008, 10:53 AM #2439Registered User
postswoo fixed it... just used = location.hash . works like a charm..
for people who might be in a similar situation i just did something like this:
Code:if(location.hash == "#info"){ function1(); //etc.... }while ( ! ( succeed = try() ) );

Reply With Quote

Bookmarks