Change The Browser URL Without Navigating Away?

Nov 3, 2005

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.

View 3 Replies


ADVERTISEMENT

Using Mouseover To Change Images For Navigating Site

Jul 23, 2005

I am developing a framed site. I'd like to utilize javascript "mousevoer" to change images that are used for navigating the site. Where to find something like that?

View 1 Replies View Related

Having A Lightbox Pop Up When A User Clicks The Back Button In Their Browser Rather Than Just Navigating Back

Jul 1, 2011

I'm looking to have a lightbox pop up when a user clicks the Back button in their browser rather than just navigating back. The purpose is to ask a question with a Yes/No answer, and if they click No, I allow them to go back. The only thing I've found anything like this is the onUnload event, but that doesn't prevent them from going back. How should this be handled?

View 1 Replies View Related

JQuery :: Detect Browser And Change Link Based On Browser?

Oct 24, 2011

I want to use jquery to detect what type of browser you are using and display a link to a .wmv file if you are on IE or display a link to a .mp4 file if you are any other type of browser.I have this script declaration in my <head> section.

<
script src="http://code.jquery.com/jquery-latest.js"></script>

In the body section I have the following

<div id="block"></div>
<
script type="text/javascript">[code]....

Nothing is being output on the page at all. I've tried to patch this together from various example on various web sites. How can I make this work?

View 1 Replies View Related

JQuery :: Navigating Up And Down The DOM?

Aug 25, 2010

if this is long and complicated. Maybe there is an easy way to do this, but I'm not figuring it out.

Sample html:
<div class="story">
<h4>
<p> (several)
<div class="pullquote">
<p> (several)

[Code]...

I want to hide the p and h4 in the stories, leave the pullquote and append a button to the pullquote that says "Read more". I can do this, so far.

Clicking the button will show all the p and h4 in the story, and also hide the button. I can find the parent div.story, but I can't seem to go back down the DOM to select all the p and h4 below.

View 2 Replies View Related

Navigating The IE Vs Netscape DOM

Nov 9, 2001

I guess because IE once again has its own variations this works or Netscape isn't following the dom I don't know which but I was hoping this type of navigation was going to be dom compliant with the newest versions of Netscape

If you have a table with the id "bob" (I like dumb names sometimes) you should be able to navigate down the table via bob.firstChild.childNodes[1].innerHTML. This does not work in netscape but does work in IE. I find this troubling because of how much easier things would have been if it worked in both. I really just wish the browsers would become equal.

The dom specification is here (outdated I believe)
http://www.w3.org/TR/1999/CR-DOM-Lev...roduction.html

Thats the specification and how it supposedly works. I am going to keep playing and figure out if maybe Netscape 'changed' it. for an example try this Code:

View 8 Replies View Related

Navigating To A Bookmark Within An IFrame

Nov 2, 2005

I load an Iframe within html page contained within another page and from the hosting page I would like to scroll to a given bookmark within the page loaded within the iframe without causing it to reload. How do I do this? I have tried:

function navIContent(bm)
{
IContent.src=bm
return
}

called by :

onclick='navIContent("../content.htm#test")'

but it doesn't seem to work!

View 3 Replies View Related

How To Detect Navigating Away From A Site

Jun 19, 2006

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 different page using
JavaScript. I am aware that it is easy to detect where you came from
(referrer), but I haven't been able to find a way to where you're going
to. I did my fair amount of research online, but I couldn't find a
solution for this.

However, my boss told me that he has seen a website that detects the
fact that you're navigating away from your site. Does anyone know
anything about this?

View 7 Replies View Related

Navigating Table With Javascript

May 31, 2007

Is there a way in javascript to scroll to or otherwise change the position of the currently selected row in a table?

View 4 Replies View Related

JQuery :: Navigating Among HTML Pages?

Mar 21, 2011

I am using O'Reilly's book on building apps with HTML, CSS, and Javascript,It uses jQuery.Chapters 4 & 5 show us how to use a database. It really works well! I'm making small changes to fit my own mobile application. I've run into one problem: The page has <li>'s to link to anchors on the same page, like this:

<li class="arrow"><a href="#dates">About</a></li>

However, I want to link to another html page. I find I'm unable to do so. The following attempts don't work; that is, clicking on them will make the row change color, but won't change the page:

<li class="arrow"><a href="about.html">About</a></li>
<li class="arrow"><a href="/about.html">About</a></li>
<li class="arrow"><a href="www/about.html">About</a></li>

[code]....

View 12 Replies View Related

Navigating Between Several Google Videos On A Single Page

Aug 17, 2006

I have a question about using embedded Google Videos on my site. Does
anyone have tips for allowing user to switch between videos (5) on the
same page? The caveat is that only one would be showing at a time. I
imagine it would require javascript coding. If so, would you have any
examples?

View 3 Replies View Related

JQuery :: Prevent Navigating Away With PreventDefault() Not Working?

Mar 24, 2011

I am checking if a form on a jQuery tab is changed, and if it has, the user should get a popup warning when they navigate away from the tab with the form or click any other link on the page for that matter. So I setup this code:

$('a').bind('click', function(event) {
if (formChanged == true) {
event.preventDefault()

[code]....

in the $(document).ready() function. I can see the code is executed, but the click on the link still comes through and the form is lost. I've tried .click() and .live('click') as well but that doesn't work either.

View 2 Replies View Related

Show Navigating Away Message For Selected Links?

Jul 12, 2010

I am trying to display an alert message when the user is in the middle of editing and clicks accidentally on some other link.

I want to display this error message for certain link and not for others.

I thought of using 'window.onbeforeunload', parse the url to find the link that was clicked. However, when I try to use the string functions (split, substring, lastindexof, etc.) inside 'onbeforeunload', they do not work.

View 5 Replies View Related

Change Look Of URL In Browser

Apr 6, 2006

I would like to change the appearance of the URL, which gets displayed
in the title of the Browser, without the page being reloaded. Sounds
strange.. here an example.

The users arrives at www.example.com and in the URL bar of the browser
he sees:

http://www.example.com

I'm looking for some javascript which would change the URL which gets
displayed in the title to:

http://www.ExAmPlE.com

without the page being reloaded!

Is that possible at all?

View 5 Replies View Related

Navigating Text String That Contains HTML Of A Page As DOM Object?

Mar 21, 2006

First, with AJAX I will get a remote web page into a string. Thus, a
string will contain HTML tags and such. I will need to extract text
from one <span> for which I know the ID the inner text.

Is it possible to access in this way "string variable".getElementByID()
somehow?

PS: Just thinking of a proper/efficient way to extract the information
from such a string. I am open to other ideas. I could load that page in
IFRAME and get my access to DOM that way, yet probably it is not an
eligant solution.

View 3 Replies View Related

Navigating Data Entry Controls On A Webpage, With Enter Key?

Oct 5, 2010

I have designed a data entry form in HTML. In all I have upwards of 16 data entry elements (varying from edit boxes, '<input>', drop down controls, check-boxes, etc)

I know by setting the tabIndex of every data entry element user can navigate easily with the Tab key. But, even if it is non-standard, can the navigation be done with the 'Enter' key instead (it is the users, non functional requirement)

View 1 Replies View Related

Resize Image According To Browser Change?

Oct 13, 2011

Basically, i have an image that i want it to be resized when i maximize and change browser size, so it is always centered. I have to use only javascript. I tried many window.resize functions but nothing works. Lets say the image is called 0000.jpg.

View 2 Replies View Related

Resize Image - According To Browser Change

Oct 13, 2011

I have an image that i want it to be resized when i maximize and change browser size. I have to use only javascript. I tried many window.resize functions but nothing works. Lets say the image is called 0000.jpg.

View 3 Replies View Related

JQuery :: Navigating To Second Page Does Not Fire Document Ready Event Handler

Sep 19, 2011

I have two files,page1.html:

<!DOCTYPE html>
<html>
<head>
<title>JQuery test 1</title>

[Code].....

When I open page2.html, and click on the brnClick link, it changes the content of divclick. If I open page1.html, and then navigate to page2.html, click on the link does not work.

View 1 Replies View Related

Expanding Menu To Stay Expanded When Click A Link To Go To Another Page While Navigating?

Jun 29, 2010

I am doing an internship at a company and am working on an existing site. The Company wants the expanding menu to stay expanded when you click a link to go to another page while navigating. I am very new to Javascript, CSS, and html and could really use some insight or code example.

// JavaScript Document
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com

[code]....

View 1 Replies View Related

JQuery :: Browser Window Size Change Event?

Jun 25, 2009

Does jquery have an event defined for when the user changes the size of his browser window? I couldn't find one, but sometimes I don't see the forest for the trees.

View 2 Replies View Related

Imitate Browser Zoom - Change All Content Dimensions?

May 9, 2010

how to imitate browser zoom with javascript?I know you are not allowed to control browser's zoom capabilities, but perhaps there's a way to change all content dimensions with javascript?In firefox, when you press ctrl+, the whole page resizes appropriately, even background images.With this imitation JS zoom, background images would not zoom since there is no scale size numer or anything like that in CSS.It would simply be cool to have a script that resizes everything on the page. That way, you can design highdefinition content that fits a 1280 * 960 browser frame, but can zoom out for smaller resolutions (1024 or 800).

View 4 Replies View Related

Event Listener For Browser Font Size Change

Aug 20, 2006

The problem:

I have an XHTML STRICT page which has some event listeners attached for onload and resize. I'm doing a bit of Javascript DHTML on these events. When a user changes the browser font size, the javascipt function needs to run. Although the TOPMENU DIV gets resized when the font changes size, its not a page resize so the function doesn't get run. I fixed this in IE6 by using a second function which is run onload and sets an event on the div object in the page after its been defined.

Problem is this doesn't work in Firefox.

Mozilla DOM reference says there is no resize event on a DIV so is there a work around to make it work in FIREFOX? i.e. can I force a resize event to happen on a div in firefox or is there some other event I can trap when a user changes the browser font size?

here's my js code: topmenu is what I'm trying to trap the resize event from.

this code is loaded in the head of the page.

function maindiv(){
estartup=document.getElementById("startup");
econtain=document.getElementById("contain");
emain=document.getElementById("main");
etopmenu=document.getElementById("topmenu");
emaincontent=document.getElementById("maincontent");
nopx = document.childNodes ? 'px' : 0;
contw = document.body.clientWidth - 80;
conth = document.body.clientHeight - 80;
if (contw < 0) { contw = 0;}
if (conth < 0) { conth = 0;}
econtain.style.width = contw+nopx;
econtain.style.height = conth+nopx;
if (conth >= 100 + etopmenu.clientHeight) {
emain.style.height = (conth - etopmenu.clientHeight - 100 )+nopx;
}
if (contw >= 172) {
emaincontent.style.width = (contw - 172 )+nopx;
}
estartup.style.visibility = 'hidden'
}


function fsize() {
etm=document.getElementById("topmenu");
if (typeof window.addEventListener != 'undefined')
{
etm.addEventListener("resize", maindiv, false);
}
else if (typeof document.addEventListener != 'undefined')
{
etm.addEventListener("resize", maindiv, false);
}
else if (typeof window.attachEvent != 'undefined')
{
etm.attachEvent("onresize", maindiv);}
else
{
window.alert('Failed to attach an Event Listener

Please Report');
}
}

if (typeof window.addEventListener != 'undefined')
{
window.addEventListener("load", maindiv, false);
window.addEventListener("load", fsize, false);
window.addEventListener("resize", maindiv, false);
}
else if (typeof document.addEventListener != 'undefined')
{
document.addEventListener("load", maindiv, false);
document.addEventListener("load", fsize, false);
document.addEventListener("resize", maindiv, false);
}
else if (typeof window.attachEvent != 'undefined')
{
window.attachEvent("onload", maindiv);
window.attachEvent("onload", fsize);
window.attachEvent("onresize", maindiv);
}
else
{
window.alert('Failed to attach an Event Listener

Please Report');
}

Any clues?

View 11 Replies View Related

Change Text Size If Browser Is Internet Explorer?

May 27, 2010

I build a website with Typo3 and it works fine, except for the text size in Internet Explorer (and Opera). I tried anything from changing the CSS templates (excluding them) to changing px to pt to em and so. Finally, I think i need a Javascript that detects the browser and if it is Internet Explorer (or Opera) the textsize should be reduce by 1. It therfore should be the same like manually clicking in IE on View->text size -> smaller (default is medium).

My javascript (I just use Javascript for this single purpose) does not work/it does not do anything:

function resizeText(){ if (browserName=="Microsoft Internet Explorer") {document.body.style.fontSize = parseFloat (document.body.style.fontSize) -1 ;}}

View 2 Replies View Related

Simple Browser Detect Then Change Visibility Of A Layer?

Aug 22, 2011

I am using CSS text-shadow but of course IE doesn't like it. I've looked into some methods for achieving the same effect in IE, but it's not at all the same so I've opted for another method..I'm going to have two layers. In layer1, it will be standard text, shadowed with CSS. I then screenshotted that and will use the resulting jpeg for layer2.I was then planning to find a script that:1. Detects if browser is IE2. If IE, layer2 is visible, layer1 is invisible3. If not IE, layer1 is visible, layer2 is invisibleThe problem is that I can't find a simple script to detect if the browser's IE or not. I can find loads of scripts that check what version of IE someone's using. The version isn't important!

View 5 Replies View Related

JQuery :: Cross-Browser On Variable Change Call Back

Jul 1, 2011

I want to bind a hook to objects member variable change event i.e. lets say I have object:
var obj { var1 : 1,
var2 : 2,
var3 : 3
};

I want to call "Magical" function like this:
onVariableChange(obj, "var1", function(obj, varname, old, new) {
alert("Variable " + varname + " changed from " + old + " to " + new);});
And after this function call every time obj.var1 is set to some value have my callback function called

I found something in internet: [URL]. Its cool but:
-It is changing Object-s prototype
-It is not working under IE 5, 6, 7, 8, 9, 10, 11, 12....
I've changed it a little bit and instead of adding to Object class prototype I'm adding it as member to any object which needs this hook. But IE still doesn't work. Is there any known cross-browser solution for this? I remember there was a jQuery upcoming project which would allow users to bind object to form and by changing one other will change automatically I wonder whats that project name and how they change input value when object member value changed.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved