473,395 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Reading URL anchor refrence

Hi,

I have a URL in my app that looks like this:

http://codinginparadise.org/my_ajax_app#helloworld

How - using javascript - can I read the "helloworld" from the URL
string?

Sep 13 '06 #1
2 37949
eg****@gmail.com wrote:
Hi,

I have a URL in my app that looks like this:

http://codinginparadise.org/my_ajax_app#helloworld

How - using javascript - can I read the "helloworld" from the URL
string?

self.document.location.hash

actually to get just "hellowworld" and not "#helloworld" that
would be like

self.document.location.hash.substring(1)
Hope that helps
Sep 13 '06 #2
"drclue" <dr****@drclue.netwrote in message
news:1i***************@newsread2.news.pas.earthlin k.net...
eg****@gmail.com wrote:
Hi,

I have a URL in my app that looks like this:

http://codinginparadise.org/my_ajax_app#helloworld

How - using javascript - can I read the "helloworld" from the URL
string?


self.document.location.hash

actually to get just "hellowworld" and not "#helloworld" that
would be like

self.document.location.hash.substring(1)
If the URL contains spaces (or other escaped characters):
http://codinginparadise.org/my_ajax_app#hello%20world
then use:
unescape(self.document.location.hash.substring(1))
Sep 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will | last post by:
(My 4 questins at end after explination) The code below was provided to me to "Popup" a window explaining what a Credit Card Verification Number is and where to find it on a card... it is used as...
2
by: Will | last post by:
(My 4 questins at end after explination) The code below was provided to me to "Popup" a window explaining what a Credit Card Verification Number is and where to find it on a card... it is used as...
11
by: pmclinn | last post by:
How should one import data that is stored in the following fashion? <Restaurants> - <Restaurant> <Category>American Restaurants</Category> <Name>APPLEBEES</Name> <Address>1273 HOOKSETT RD,...
3
by: gary | last post by:
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a...
10
by: elibol | last post by:
Hi, Is there an event that fires when the back or forward button on a browser is pressed? I need an event to fire when someone clicks the back or forward button after an anchor has been set. ...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
5
by: SamirM | last post by:
i am new to java. i am having trouble running some of my codes. Can someone tell me why i am getting "I/O Exception while Reading, Connection refused", message.?
3
by: Joseph Gruber | last post by:
Hi all -- I have two questions. First, I'm adding a control to my form at runtime and the control/form seems to ignore the anchor property of the runtime control. Any idea how I can get a...
6
by: jeudi33 | last post by:
Hello everybody, First of all, please bear with me if I'm not clear because 1-English is not my 1st language and 2-I'm a designer (yes, I know) and not familiar with developer terms. Well, if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.