473,404 Members | 2,179 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,404 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 37950
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.