473,395 Members | 1,454 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.

javascript set location without redirect

hi all,

i am working on a ajax calendar program, where the user will click on
a date and its corresponding event list will be displayed beside it
(similar to http://www.google.com/calendar). there are day & week
views, the event list is picked from a database and the page will
never refresh anytime. am done up to this point!

i would like to add a feature, where permanent links can be set for a
day's event list. like when the user clicks on a date, a permanent
link is put on the location/address bar, which he can copy and sent it
to others.

yeah, just like http://wikimapia.org (not like http://maps.google.com/)...
where we scroll the map - the url in address bar automatically changes
to the permanent link... lcheck this place 'Who planted this and
why?' (http://wikimapia.org/
#lat=1.847196&lon=-157.473527&z=18&l=0&m=a&v=2) ...

well i know to pickup the parameters from the address bar
(window.location.search) and display the event list, but how to set
this string without refreshing the page.
so the user clicks on 23rd Oct, 2007 in the calendar and the address
bar must read
ajax_calendar.htm?date=20071023

many thanks for any kind of help!
please let me know if am not clear enough

thaankqquu - cforcloud

Oct 22 '07 #1
5 13322
On Oct 22, 12:51 pm, cforcloud karulvan <cforcl...@gmail.comwrote:
hi all,

i am working on a ajax calendar program, where the user will click on
a date and its corresponding event list will be displayed beside it
(similar tohttp://www.google.com/calendar). there are day & week
views, the event list is picked from a database and the page will
never refresh anytime. am done up to this point!

i would like to add a feature, where permanent links can be set for a
day's event list. like when the user clicks on a date, a permanent
link is put on the location/address bar, which he can copy and sent it
to others.

yeah, just likehttp://wikimapia.org(not likehttp://maps.google.com/)...
where we scroll the map - the url in address bar automatically changes
to the permanent link... lcheck this place 'Who planted this and
why?' (http://wikimapia.org/
#lat=1.847196&lon=-157.473527&z=18&l=0&m=a&v=2) ...

well i know to pickup the parameters from the address bar
(window.location.search) and display the event list, but how to set
this string without refreshing the page.
so the user clicks on 23rd Oct, 2007 in the calendar and the address
bar must read
ajax_calendar.htm?date=20071023

many thanks for any kind of help!
please let me know if am not clear enough

thaankqquu - cforcloud
Use window.location.hash. It's the stuff in the URL following the "#"
sign. Originally used for named anchor tags on a page (you know, <A
NAME="top">top</ablah blah blah <A HREF="#top">To top</Afrom the
days of yore), it's emerged as the only way to track page state in the
URL. Browser history managers such as Really Simple History and YAHOO
UI History Manager use it to simulate back-button functionality on
Ajax-heavy pages; their (open-source) codebases might give you some
ideas. Note however that the location hash is not sent to the server,
so don't rely on your server-side code being able to do any work on it
for you.

-David

Oct 22 '07 #2
On Oct 22, 5:21 pm, David Golightly <davig...@gmail.comwrote:
On Oct 22, 12:51 pm, cforcloud karulvan <cforcl...@gmail.comwrote:


hi all,
i am working on a ajax calendar program, where the user will click on
a date and its corresponding event list will be displayed beside it
(similar tohttp://www.google.com/calendar). there are day & week
views, the event list is picked from a database and the page will
never refresh anytime. am done up to this point!
i would like to add a feature, where permanent links can be set for a
day's event list. like when the user clicks on a date, a permanent
link is put on the location/address bar, which he can copy and sent it
to others.
yeah, just likehttp://wikimapia.org(notlikehttp://maps.google.com/)...
where we scroll the map - the url in address bar automatically changes
to the permanent link... lcheck this place 'Who planted this and
why?' (http://wikimapia.org/
#lat=1.847196&lon=-157.473527&z=18&l=0&m=a&v=2) ...
well i know to pickup the parameters from the address bar
(window.location.search) and display the event list, but how to set
this string without refreshing the page.
so the user clicks on 23rd Oct, 2007 in the calendar and the address
bar must read
ajax_calendar.htm?date=20071023
many thanks for any kind of help!
please let me know if am not clear enough
thaankqquu - cforcloud

Use window.location.hash. It's the stuff in the URL following the "#"
sign. Originally used for named anchor tags on a page (you know, <A
NAME="top">top</ablah blah blah <A HREF="#top">To top</Afrom the
days of yore), it's emerged as the only way to track page state in the
Bookmark navigation is its purpose. That hasn't changed.
URL. Browser history managers such as Really Simple History and YAHOO
UI History Manager use it to simulate back-button functionality on
Ajax-heavy pages; their (open-source) codebases might give you some
It should be noted that this practice is completely insane. Web apps
need to implement their own navigation interface.

Oct 23 '07 #3
On Oct 23, 4:58 am, David Mark <dmark.cins...@gmail.comwrote:
On Oct 22, 5:21 pm, David Golightly <davig...@gmail.comwrote:
On Oct 22, 12:51 pm, cforcloud karulvan <cforcl...@gmail.comwrote:
hi all,
i am working on a ajax calendar program, where the user will click on
a date and its corresponding event list will be displayed beside it
(similar tohttp://www.google.com/calendar). there are day & week
views, the event list is picked from a database and the page will
never refresh anytime. am done up to this point!
i would like to add a feature, where permanent links can be set for a
day's event list. like when the user clicks on a date, a permanent
link is put on the location/address bar, which he can copy and sent it
to others.
yeah, just likehttp://wikimapia.org(notlikehttp://maps.google.com/)...
where we scroll the map - the url in address bar automatically changes
to the permanent link... lcheck this place 'Who planted this and
why?' (http://wikimapia.org/
#lat=1.847196&lon=-157.473527&z=18&l=0&m=a&v=2) ...
well i know to pickup the parameters from the address bar
(window.location.search) and display the event list, but how to set
this string without refreshing the page.
so the user clicks on 23rd Oct, 2007 in the calendar and the address
bar must read
ajax_calendar.htm?date=20071023
many thanks for any kind of help!
please let me know if am not clear enough
thaankqquu - cforcloud
Use window.location.hash. It's the stuff in the URL following the "#"
sign. Originally used for named anchor tags on a page (you know, <A
NAME="top">top</ablah blah blah <A HREF="#top">To top</Afrom the
days of yore), it's emerged as the only way to track page state in the

Bookmark navigation is its purpose. That hasn't changed.
URL. Browser history managers such as Really Simple History and YAHOO
UI History Manager use it to simulate back-button functionality on
Ajax-heavy pages; their (open-source) codebases might give you some

It should be noted that this practice is completely insane. Web apps
need to implement their own navigation interface.
What alternatives are there, and how do they work, exactly, without
"breaking the back button"?

Oct 23 '07 #4
cool David Golightly! thats absolutely what i need... thanks a mil!! i
have implemented it and its perfect. i had no idea there are so much
in window.location [http://developer.mozilla.org/en/docs/
DOM:window.location]

Oct 23 '07 #5
On Oct 23, 4:25 pm, David Golightly <davig...@gmail.comwrote:
On Oct 23, 4:58 am, David Mark <dmark.cins...@gmail.comwrote:


On Oct 22, 5:21 pm, David Golightly <davig...@gmail.comwrote:
On Oct 22, 12:51 pm, cforcloud karulvan <cforcl...@gmail.comwrote:
hi all,
i am working on a ajax calendar program, where the user will click on
a date and its corresponding event list will be displayed beside it
(similar tohttp://www.google.com/calendar). there are day & week
views, the event list is picked from a database and the page will
never refresh anytime. am done up to this point!
i would like to add a feature, where permanent links can be set for a
day's event list. like when the user clicks on a date, a permanent
link is put on the location/address bar, which he can copy and sent it
to others.
yeah, just likehttp://wikimapia.org(notlikehttp://maps.google.com/)...
where we scroll the map - the url in address bar automatically changes
to the permanent link... lcheck this place 'Who planted this and
why?' (http://wikimapia.org/
#lat=1.847196&lon=-157.473527&z=18&l=0&m=a&v=2) ...
well i know to pickup the parameters from the address bar
(window.location.search) and display the event list, but how to set
this string without refreshing the page.
so the user clicks on 23rd Oct, 2007 in the calendar and the address
bar must read
ajax_calendar.htm?date=20071023
many thanks for any kind of help!
please let me know if am not clear enough
thaankqquu - cforcloud
Use window.location.hash. It's the stuff in the URL following the "#"
sign. Originally used for named anchor tags on a page (you know, <A
NAME="top">top</ablah blah blah <A HREF="#top">To top</Afrom the
days of yore), it's emerged as the only way to track page state in the
Bookmark navigation is its purpose. That hasn't changed.
URL. Browser history managers such as Really Simple History and YAHOO
UI History Manager use it to simulate back-button functionality on
Ajax-heavy pages; their (open-source) codebases might give you some
It should be noted that this practice is completely insane. Web apps
need to implement their own navigation interface.

What alternatives are there, and how do they work, exactly, without
"breaking the back button"?
How can you break the back button without navigating? My point is
that a Web app should have its own interface if it wants to provide
pseudo-navigation (e.g. back and forward buttons.) Same for adding
bookmarks to specific views of the page.

Oct 24 '07 #6

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

Similar topics

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:
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.