JQuery :: Second Page Has No Back Button
Dec 14, 2011Im working with O'Reileys jQuery Mobile Book. I made the first steps and got the first problem..My second page has no Back Button
[Code]...
Im working with O'Reileys jQuery Mobile Book. I made the first steps and got the first problem..My second page has no Back Button
[Code]...
I am trying to write a script that uses the IF statement to see wether or not a user clicked the back button to come to a page, and then if it's true to not let the page load and kick them back X number of pages (say 4) This is what I have so far:
<script language="JavaScript"><!--
if javascript:window.history.back == 1
{
javascript:window.history.back(4);
return false;
}
//--></script>
In Mac Safari 4.04 & Firefox 3.6, I am seeing page state being persisted on back button to page. I couldn't reproduce on jquery 1.3.2.
Here's a simple example:
<html>
<body>
<script type="text/javascript" src="jquery-1.4.js"></script>
<a href='#content1'>tab 1</a> <a href='#content2'>tab 2</a>
[Code]....
1. Click on one of the anchors.
2. Goto another page
3. Click the browser back button
Result: One of the sections is still hidden. Is anyone else seeing this? How is jquery doing this?
Unique url and browser back button in an ajaxified page
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#666666">
<font size="-1"><font face="Calibri">Hi,
Does jQuery provides any feature or plugin to handle unique url andbrowser back button in an ajaxified page.
[Code]...
I have a page where a user can progressively download more thumbnail images. New thumbnails are loaded using '$.get' followed by an 'append' to the main thumbnail container. If a user clicks on a thumbnail then they link to another page to see the full size image. If the user then presses the back button, the page of thumbnails has returned to its initial state. I was hoping that all the additionally downloaded thumbnails would remain in memory! Is there a way around this? Keeping track of any additional thumbnails that have been downloaded when navigating the to the full size image page and then re-loading them when the user returns to the thumbnails page is not really an option as I don't want the user having to wait for this. This is what facebook appears to do after one has loaded lots of additional items on their news feed - if one links to another page and hits the back button, my suspicion is that all the items are re-loaded - they're not just re-displayed from memory.
View 2 Replies View RelatedI have a number of pages that organize book data by category and then by unit, chapter, section, etc... Since there is a ton of data I display the headings and hide the rest of the content for the category. When a user clicks the heading then the content for the heading is shown underneath it. This works great and the users don't have to scroll (at least not much in comparison to if everything on the page was visible) unless for some reason they expand tons of stuff.
The problem:My company wants it so that if they expand a bunch of stuff and then browse to another page, that when they click the back button, everything should still be expanded as they left it. The issue is, this content is only available to logged in users and is based on their current location (which they can change at any point), so if their session expires or they logout, using the back button to get to these pages needs to redirect them to the login screen, if they change pages and change their location, going back to this page needs to display the correct content for their location. It is kind of a catch-22. Of course in the eyes of my company "shouldn't it just work that way?"
how do i make the page go all the way to the top after you press the back button?
for example, you would go to page 1 and you scroll mid-way, then you press a link to page 2. then you press the back button on page 2 and takes you back to page 1 but it brings you back to the section where you scrolled mid-way.
is there any way to make it so it will automatically bring you to the top of the page. ive seen it on other sites.
after hitting 'back' button I'm taken to spot on page where I was, but I'm being asked to do the opposite -- take user to the top of the page, after hitting 'back' button... when I look up this issue, most people complain of the opposite - that the browser takes them to to top of the page after hitting 'back' button...;-) [URL] is there a way with JavaScript to force page to go to the top of the page when you navigate to a back via 'back' button?
View 3 Replies View RelatedI have a photo gallery that cycles images using custom buttons and replacing images from an javascript array. I do this so that I don't reload the page each time, just put up the next image so the next image (preloaded) appears instantly. I change the URL to include the image name so that it can be saved, linked, sent etc.
If I load the page and cycle through some pictures and then use the back button I can't find a way of detecting this and putting up the previous image - it just changes the URL in the browser and eventually unloads the page when it should.
when you have a page that contains an iframe, and then navigate inside the iframe, hitting the browsers back button will only affect the contents of the iframe and not the entire page. I've been searching all over for solutions and cant find one that works for my current implementation.
function ShowPage(frame)
{
frames[0].location = frame+'.html'
frame.contentWindow.location.replace(newUrl);
}
[Code]...
Anyone has code to program a back button for a page that uses html5 and AJAX?
View 2 Replies View RelatedI am trying to trigger an event once the user clicks the browsers back/forward buttons, I have built a system just like facebook where if the user has javascript turned on they get the full feature of the site which includes fast switching for example if someone goes to this page "example.com/index.php" and click a link to contact.php it would change the url to "example.com/index.php#!/contact.php" but what I need to know is if there is any way to change the pages content when the user goes back and forth through the fast switch pages? something like "history.back !== -1" or something like that.
View 2 Replies View RelatedHere is the url:The issue, as you will see, is initially when my front page loads the "menu" animates into place. Then after a button is clicked:
$(".home_button").click(function() {
$('#content_menu').stop().fadeOut(1000,function() {
window.location = "http://jquery.com/";
[code]...
That all works fine. The issue is when I use the back button on the browser to return to the home page the animation never triggers and the page remains unusable until a refresh. How can I have this page refresh when the user uses the back button and/or is there a better way to do what I'm asking?
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 RelatedHow you handle back button scenario in firefox browser. The problem is when i click browser back button , the javascript on load is not executed and page is rendered from cache.
View 1 Replies View RelatedI am trying to capture the back button and redirect if it is a certain URL, if not just go back like a normal back button.I've never really messed with the history except for something like this: <a href="#" onClick="history.go(-1)">Anyone have an example using this plugin: [URL]r any other plugin that might achieve this
View 1 Replies View RelatedI have a page that is dynamically build through DOM manipulation. So, when I browse outside the page, and then click back, those dynamically created DOM objects are gone. I can rebuild the page easily. So the point is that if the user leaves the dynamic page, then clicks back on their browser, I need the page they are going back to to refresh. I thought it might be something about caching, so I've tried to use all following 3 META tags but it doesn't work.
Code:
<meta http-equiv="Pragma" content="no-cache">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I am on the page [url]. I click on the .mouseenter() link and get to page [url]. Now I click on the IE back button and wait. Finally, when I click on the back button a second time, I return to the page [url]. Two clicks on the back button is a problem.
View 4 Replies View RelatedI have a jquery-powered "start page" that checks your log in and if successfull it slides in a "menu" of new places to go. The problem is, if you click back from one of the new places, the original "start page" looks as if you never logged in. You have to reload the page. Not very intuitive and this website is for kids. Now I've tried setting form field values with server session variables, javascript variables, etc etc but they all get reset when you click back. I've tried the "onunload hack" which I don't fully understand, and then read a bit about the onhashchange event which is from what I gather only compatible with HTML5 browsers...is there no way to detect if the user is already logged in when they click the back button or am I not doing enough homework?
View 2 Replies View RelatedI need to capture the browser back button to execute ajax function
View 1 Replies View RelatedI use append() to add html fragments to a page dynamically. This works fine until the user navigates to another page and then clicks on the browser back button. The dynamically added html fragments are no longer visible. I read somewhere that dynamically added elements are not remembered by the browser and therefore the back button will only render the original page (without the dynamically added elements).
View 2 Replies View RelatedHas anyone been able to get back button history to work with UI Tabs.
or any way to make the back button work with previous visited tabs.
I tried using the history plug but im not sure how to make it work with ajax created tabs.
I'm using a JQuery function to slide a div into and out of visibility, but every time I toggle, the browser resets my view to the top of the web page..What I want to happen is when you click to reveal the div, the page scrolls down and the div content is in full view. When I click again to re-hide the div, I want the page to scroll back up smoothly instead of just reverting to the top of the whole page...The page url is: http:[url]....Here's my code:
Code:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".content").hide();[code]......
how do i detect user has clicked back button of browser and i want to prevent it from redirecting to back page i dont want to disable the back button
View 2 Replies View RelatedI found this script for filtering data in a table:[URL]
However say I type something in the filter, I click a link on the page, and then use the back button...the form resets. Is there a way to prevent this/leave the table filtered?
I am loading the pages in a div. Without reloading the page the content is loading into the page by using the below method.
Script
$(document).ready(function(){
$('a.menu_links
[code]....