469,273 Members | 1,810 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,273 developers. It's quick & easy.

Change the browser URL without navigating away?

Yahoo! has launched a beta of it's new mapping application:

http://maps.yahoo.com/beta/

It's based in Flash, but it uses JavaScript. I'm curious about one
feature, though - when you pan about the map, the URL in the address
bar of your browser changes to match your current location. How have
they done this? I thought calling window.location.href = "etc"; would
reload the page, navigating away from the current URL. Yahoo! have
managed to do this without the page changing. This is a very useful
technique for DHTML/AJAX/Flash technology and I'd love to know how
they've done it.

Many thanks,
Paul.

Nov 3 '05 #1
3 31512
VK

Paul Neave wrote:
Yahoo! has launched a beta of it's new mapping application:

http://maps.yahoo.com/beta/

It's based in Flash, but it uses JavaScript. I'm curious about one
feature, though - when you pan about the map, the URL in the address
bar of your browser changes to match your current location. How have
they done this? I thought calling window.location.href = "etc"; would
reload the page, navigating away from the current URL. Yahoo! have
managed to do this without the page changing. This is a very useful
technique for DHTML/AJAX/Flash technology and I'd love to know how
they've done it.

Many thanks,
Paul.


An example of non-parallel thinking, combined with 3W recommendations
sent to the hell.
Link hash part (anchor name) #blah-blah-blah does not lead to
navigation away from the current page. Unresolved anchor names do not
lead anymore neither to a page shift not to an error: tested on IE 6.0
and FF 1.0.7
Opera 8.1 fails on it (did not check yet Opera 8.5, cannot check Safari
and Konqueror)

document.location.hash = "Write all what you need";

Ingenious! Another exellent example to myself to read less about
standards or rely on some previous experience. Only continues
experiments on concrete systems have practical value.

Nov 3 '05 #2
"Paul Neave" <pa********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Yahoo! has launched a beta of it's new mapping application:

http://maps.yahoo.com/beta/

It's based in Flash, but it uses JavaScript. I'm curious about one
feature, though - when you pan about the map, the URL in the address
bar of your browser changes to match your current location. How have
they done this? I thought calling window.location.href = "etc"; would
reload the page, navigating away from the current URL. Yahoo! have
managed to do this without the page changing. This is a very useful
technique for DHTML/AJAX/Flash technology and I'd love to know how
they've done it.

Many thanks,
Paul.


Only the hash part of the url is changing. You can do this as follows:

parent.location.hash = 'hello';

The actual URL http://maps.yahoo.com/beta/ before the '#' cannot be changed without a page reload.


Nov 3 '05 #3
Thanks guys - for those interested, here are some workarounds that use
this method for bookmarking and using the back button in Flash:

http://www.quasimondo.com/archives/000570.php

http://www.unfocus.com/Projects/FlashSuite/

http://www.chakramedia.com/deeplink-...ton/index.html

Nov 3 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by hiriumi | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.