JQuery :: Lost Page State After Pressing Back Button?

May 22, 2010

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


ADVERTISEMENT

JQuery :: 1.4 Restoring Page State On Back Button?

Jan 22, 2010

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?

View 3 Replies View Related

Div Textfields Missing After Pressing Back Button

Oct 31, 2005

I have an html page with a div element within a form for dynamically
creating textfields.

The problem is when I click a link on the page, or the submit button,
then click the back button, the new textfields in the div element are
not there anymore.

Does anyone know how this scenario is usually handled?

View 1 Replies View Related

Separation Between View And State (The Back Button)

Jul 13, 2006

Let's say you have a "Buy" botton that posts a form to a script that
inserts or increments the quantity of a record in a shopping cart
table. So you click "Buy" and then "Checkout". Now if you hit the Back
button it asks the user if they would like to repost the form. If they
click "Ok" the db script runs again and now they have two items in
the cart.

It seems to me this is a fundamental model view controller kind of
problem. There's no seperation between the view and the controller. Can
someone recommend a generic method for providing that seperation? I could
have the script emit a Location header but that's a strange hack. What
is the definitive method for solving this probably very common issue?

View 1 Replies View Related

When Pressing "back" In A Web Browser, Radio Button Selection Is Still Retained

Aug 3, 2010

I have a page where you select a radio button and submit to get certain results. When pressing the back button to get back to the original search page, however, the radio button is still selected, but the page lists it's value as undefined. I wish to do one of the following:

1) assign the radio button's value to what it is actually showing

2) clear out all selections

Here is some relevant code:

Code:
function PageLoad()
{
document.all.item("radioSearch").value = 0;
alert(document.all.item("radioSearch").value)

[Code].....

View 4 Replies View Related

Set Js Function Back To Initial State When Page Is First Loaded?

Jun 9, 2011

I have a scripts which filters a list of data based on a users selection from dropdowns in a form. The script updates a counter while the user is making the selections and also colates a url string which I then use to query a php db when the user clicks view results.

I also have a reset button in the form so the user can quickly go back to the start. When this is clicked it does reset all the dropdowns and inputs to their defualt values but it doesn't reset my js functions back to their initial states.

Can anyone tell me how I can do this? Is there a js reset function I can use?

View 1 Replies View Related

Detect Back Button - True To Not Let The Page Load And Kick Them Back X Number Of Pages

Feb 24, 2004

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>

View 14 Replies View Related

JQuery :: Second Page Has No Back Button

Dec 14, 2011

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]...

View 2 Replies View Related

JQuery :: Unique Url And Browser Back Button In An Ajaxified Page

Jul 2, 2009

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]...

View 1 Replies View Related

JQuery :: Stopping Back Button From Refreshing The Page And Undoing All The User Actions?

Aug 25, 2010

I 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?"

View 2 Replies View Related

Going To The Top Of The Page When Using The 'back' Button

Jan 27, 2007

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.

View 6 Replies View Related

Hit Back Button - Go To TOP Of Page

Aug 3, 2010

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 Related

OnClick Event Of Button 1 By Pressing Button 2

Jul 23, 2005

I am wanting to fire the onClick event of button1 by pressing button2.

Does anyone have a clue if this is even posible?

View 3 Replies View Related

Back Button Detect With Same Page In History

Nov 27, 2009

I 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.

View 4 Replies View Related

Browser Back Button On A Page Using Iframe Content?

Feb 1, 2011

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]...

View 4 Replies View Related

Ajax :: Program A Back Button For A Page That Uses Html5?

Sep 28, 2011

Anyone has code to program a back button for a page that uses html5 and AJAX?

View 2 Replies View Related

Detect Browser Back Button Press With No Page Reload?

Nov 23, 2010

I 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 Related

JQuery :: Zoom The Whole Page By Pressing Ctrl +

May 18, 2010

I am wanting to zoom the whole pagelike you can do by pressing ctrl + with the use of buttons on the actual website.

View 1 Replies View Related

Show Text After X Time After Pressing A Button

Apr 25, 2010

I've got the following problem: I want to edit this code:

<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.pp"><img src="http://blog.bastian.info/wp-content/uploads/2010/02/facebook-glossy-logo.jpg"></a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

So that after they click the button that triggers the facebook share, 7 seconds after they click it, some text appear and the picture they click disappears.

View 3 Replies View Related

How I Can Print An Image In A Webpage By Pressing A Button?

Mar 15, 2007

I want my webpage to print an image when the user clicks the "Print this Image" button. I have tried but when I click the button it prints all the contents including the image! What I want is that when the user clicks the button it shud print only the image in that page and nothing else. I have placed the image and the button in a form tag, in a separate table below the main table in which the main contents of the site contains, but it still dont work. How I can make it work?

View 1 Replies View Related

JQuery :: Using "window.location" For Link But Back Button Does Not Refresh Initial Page?

Nov 1, 2011

Here 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?

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

Display The Fetch Value From Db In A Textfield After Pressing Load Button?

Oct 19, 2011

I have a little problem in my code.i want display the fetch value from db in a textfield after pressing load button.i am using ajax post method for it but cant figure it out

<html>
<head>
<script type="text/javascript" src="jquery.js"></script>[code]...........

View 8 Replies View Related

Create Div Once Click Down Mouse And Move Away While Still Pressing Its Button?

May 14, 2010

I need to create a div once i click down the mouse and move away while still pressing the mouse button.

View 4 Replies View Related

Firefox - When Click Browser Back Button On Load Is Not Executed And Page Is Rendered From Cache

Aug 20, 2011

How 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 Related

JQuery :: Button Widget Won't Return To Ready State In IE8 But Does In FF

Mar 15, 2011

I am chaining a .click function to the .button jquery UI widget. I get the action I want just fine but the in IE8 the button does not return to the ready state after I click. It works fine in FF.

$('#myButton').button()
.click(function () {
$('#total').text('here it is');
})

[Code].....

View 2 Replies View Related







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