473,387 Members | 1,700 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,387 software developers and data experts.

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 31897
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: rufus | last post by:
Hi, In an ASP.NET application I have tried using javascript to prompt a user to save their changes if they try and navigate away without saving their changes. The problem is that this...
1
by: Sin Jeong-hun | last post by:
Hello. I created a very simple program which just pops up a MessageBox saying "Hello,world!". I compiled it and put it on my homepage and created a hyperlink to it. When I click the hyperlink to...
1
by: sauron8888 | last post by:
how can i prepare a web browser without using axwebbrowser?
7
by: hiriumi | last post by:
Hello folks, I have a web application that has basic authentication turned on (IIS). What I would like to accomplish is detect whether user is navigating away from the site or simply going to the...
2
by: Tom v | last post by:
My site uses forms extensively and I would like to implement a feature that if a user enters data and then tries to navigate away from site a warning message is displayed. I searched and found the...
1
by: celery6541 | last post by:
Hi all, Is there a way to confirm that a user wants to navigate away from a page when they type something in the url bar and hit enter?
4
by: nrocha | last post by:
Hello, I've been trying to detect when a user closes a page or navigates away from it. This is part of a solution for locking pages (that is, if a user enters a page, no one else can enter it...
1
by: 9916404403 | last post by:
How to display PDF file in browser without having any save option using Asp.net my mail id is email removed for security
8
by: Adam Tippelt | last post by:
Scenario: I've got a table for adding records, with a subtable for all data requirements related to that record. I've built a 'view' form to navigate through the records, so that you can view the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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:
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
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.