Connecting Tech Pros Worldwide Help | Site Map

Change the browser URL without navigating away?

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 3rd, 2005, 09:55 AM
Paul Neave
Guest
 
Posts: n/a
Default 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.


  #2  
Old November 3rd, 2005, 11:15 AM
VK
Guest
 
Posts: n/a
Default Re: Change the browser URL without navigating away?


Paul Neave wrote:[color=blue]
> 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.[/color]

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.

  #3  
Old November 3rd, 2005, 11:45 AM
Zwerfkat
Guest
 
Posts: n/a
Default Re: Change the browser URL without navigating away?

"Paul Neave" <paul.neave@gmail.com> wrote in message
news:1131014890.465631.139740@o13g2000cwo.googlegr oups.com...[color=blue]
> 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.[/color]

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.




  #4  
Old November 3rd, 2005, 03:35 PM
Paul Neave
Guest
 
Posts: n/a
Default Re: Change the browser URL without navigating away?

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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.