473,465 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 31903
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...
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:
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.