History.back And Refresh
Nov 21, 2007i need go to back page using history.back() but this page dont refresh, i need this
how ican refresh the back page?
i need go to back page using history.back() but this page dont refresh, i need this
how ican refresh the back page?
I have a webpage popup (lets call it POPUP) which refreshes the opener window (this one we call PARENT) when we close it, saying we want to save data. For this, we use
top.oWndOpener.refresh();
When we don't want to save the POPUP data, we just close the popup and
don't refresh the PARENT. In the PARENT we have a "Back" link which executes a simple
history.back()
The problem is:
If we refresh parent, we need to go back 2 pages, because the refresh
method adds another page to the history. But we have no (easy) way of
knowing in the PARENT if it had been refreshed. With this, our users
are forced to click two times in the Back link.
Is there anyway of going back to the previous page, no matter how many
refreshes happened in the current one ?
I have a form with a "Print" button on the page. When the user clicks this it doesn't actually print but opens a condensed version of the page, passing the field contents with php. On the new (condensed) page I capture the load of the page in js and when it occurs issue the command print(). This works fine.
But once I've done this (printed) I would like to return to my original form. I've tried
if (print()) history.back()
print()
history.back()
neither seems to work. As an experiment I put the following code at the bottom of my condensed page that prints...
<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM>
Clicking on the resulting button does exactly what I want... clears the form and returns me to my original.
I just don't what to
a) print the form with that button on it
b) require user input after the printing.
So... can anyone point me in a way of making history.back() work outside of an onClick construct?
I used <input type="button" value="Back to Correct" onclick="window.history.back();"> to go back to the previous page is working, but if i use the as below instead, it does not work. what did I do
wrong?
I'm attempting to use the javascript 'history.go(-1);' to make a page automatically return to the last page a user visited. At the moment, I can get this to work ONLY if I insert a link into the page.
What I want to happen is, the page autmatically sends the user back to the previous page after a set time. I have this for my JS:
function backtomusic() {
window.location = history.go(-1);
}
And in the body section of my page I have:
<body onLoad="setTimeout('backtomusic()', 3000)">
When it runs I get an error saying 'undefined' in the browser address bar
Any ideas?
Have a slideshow navigation and want to put a DOM onubtrusive JS that finds the <a> in <li id="nav-back">and executes history.back() with a onclick handler. No worry about JS disabled because then I use a other link that is hidden when JS is enabled ...
Some questions-ideas
What do i need to put in the <a href="??"> of <li id="nav-back"> ?
And the script I started see below, should it be written like that ??
History.back() works perfectly cross-browser in DOM capable browsers ??
This is the HTML
<div id="navwrap">
<ul id="nav">
<li id="nav-prev"><a href="#" title="go to previous image">previous</a></li>
<li id="nav-back"><a href="#" title="go to overview of images">back to overview</a></li>
<li id="nav-forward"><a href="#" title="go to next image">next</a></li>
</ul>
</div>
Is this how to do go about it
if (!document.getElementbyId) {return;}
var backButton = document.getElementbyId('nav-back').document.getElementBytagname('a')
backButton.onclick = history.back();
}
Is it possible to show in the title tag that last history entry ?
I have an input button that i have assign to. Is there a way to use this but force the previous page to be refreshed?
View 3 Replies View RelatedCan someone show me how I can have:
<a href="javascript:history.back()" name="Back" value="Back"
style=width:40px;float:right;margin-left:0px class="button" >Back</a>
but since this href exists in a frame, it only pertains to this frame?
On a page of mine a user might submit data several time, which adds an
entry to the history each time (similar as
http://www.google.com/trends?q=iPod...o=all&date=all).
Yet later the user wants to go back to the previous page in one step.
Now is it possible to loop backwards through the history until a
different page is reached? Has anybody coded something like this?
Has 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.
just trying to get this to work. Code is inserted into document head. I am using this on a confirmation page that comes up after submitting a form, I want the page to redirect to the previous page. I am also wanting to add a timer indicator to the page as feedback to the user.
<script type="text/javascript">
redirTime = "5000";
redirURL = "history.go(-1)";
function redirTimer() { self.setTimeout("self.location.href redirURL;",redirTime); }
</script>
[Code]...
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.
I have a page which I've just added a div to so that it will show/hide 'advanced' search options. The problem is that I've not found a way to 'show' the div when a history.back() command is used.
First off I had it so that the div style was display:none. Site user would click on 'Refine Your Search' to show the additional fields. That worked fine, but the customer wants it so that when they go back from the search results to the search page it 'remembers' which boxes were ticked.
The problem is that when it does the history.back(), the 'Refine Your Search' radio button is selected but the div with the controls doesn't show. So, thinking I was clever I thought of an alternative way to skin this cat .
Instead of having the style of the div set as display:none I would set it as display:block and then have a javascript function that would set it to display:none when the page initialised. That way the 'default' state for the div would be display:block.
No dice...even though in the source code it shows the style of the div as being display:block the div STILL doesn't show.
The search page is at: [url]
Click on 'refine your search', tick a box (e.g. air conditioning) and then click the search button. Then at the bottom of the results page click the link to go back. You'll see the problem.
I need an html page that when visited automatically redirects the browser to return to the previous page it was on. here is the current code I have:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>[code]....
this works in firefox but in IE you have to press ok in the alert box before it returns. I admit I am a javascript novice. Any suggestions
If I type http://domain.com/product/5 into my browser I will see the
product details in the main div plus a side bar div containing links to
other products. This side bar is common to all product views. I click a
sidebar link to product 6 and an ajax request updates the main cell
with the product 6 information. My location bar will still say
/product/5. If I refresh the browser I will see product 5. If I
bookmark the page it will be for product 5. If I click the back button
I will go to the page I saw before product 5. I know none of these
problems with AJAX are new. Why is it that JavaScript can't tell the
browser "Now you are looking at http://domain.com/product/6"? Is there
a security risk? Is this just something not yet implemented?
Im trying to make a back button that reloads the previous page the user was at.
The back button will be on a small top frame and the page that needs to be controlled will be in the main frame.
The top frame is just a navigation system, and all pages will be loaded in the main frame.
Im trying to use this Code:
<FORM>
<INPUT TYPE="button"
NAME="back"
VALUE="BACK"
onClick="history.go(-1)">
</FORM>
Does anyone know how I could accoplish the desired result using this code, or any other code? And what about a foreward button?
I use a function something like this,
<a href="javascript:history.back();">Return to original page</a>
to give people a "back" option sometimes on pages.
Is there any way of directing them back to a particular named anchor on the last page?
What i'm doing is that i've got a sign-up form. Since the signup form can be accessed from many pages, i'm trying to use javascript to go back to the page the person comes form. so what i'm using is this:
PHP Code:
This works perfectly.. BUT.. in some browsers i have to press refresh to have the changes made.
E.g. index.php says "hello guest" after signing in some browsers say "hello user" some like ie5 say "hello guest" (if i refresh, then it says "hello user")
So is there anyway to goback to the previous page in history and not to use the cache?
I need some script to force the browser to reload/refresh when a page is reached from the back button.
EG You're on page A -> You click a link onto page B -> You Press Browser back to go onto Page A, it has old content that requires a reload.
Now, my page is currently php so I won't bother with my code here as I am looking for any solution (I have also posted in php forum).
Any JS solution that will trigger a reload on browser back is appreciated. I have tried a few ideas, most work in Chrome, IE always works, Firefox 4 and Opera 11 wont reload, simply fetching from cache I believe.
I have many tags. I want click each tag, then post/get the tag's value to another page. In another page, received the values and make a mysql query. Then return the resalt data to the first page(do not make an iframe).
[Code]...
I've got links on a website that takes the user to different parts of the same page (i.e, no reloading of the page)
I would like 2 things to happen when a link is clicked:
1) the url changes eg. from mysite.com/home to mysite.com/about when the about link is clicked.
2) when refreshing the page that it stays where it's at and not go back to the top of the page.
Is there a way to create an alert that would pop-u when the user clicked refresh?
On refresh:
"Warning: Refreshing this page will bring you back to the beginning of the application. Are you sure you want to refresh the page?"
Yes - No
On page forward or back:
"Warning: Using the forward/back buttons may cause unexpected problems. Please use the tabs to navigate from page to page. Are you sure you want to use the forward/back button?"
YES - No
I've got some popup windows with help screens in them. The screens are other pages of my site specially sized to fit. Those pages have links to other pages, so users can navigate them inside the popup.So I thought I'd do two things:
1. Put a back button in the popup to let the user go back one or more pages in the help screens. But a simple button saying history.back() or history.go(-1) just does nothing.
2. Let the user refresh the pop-up content so that the user can go back to the first page of the help screen without having to close the pop-up and reopen it from the main page.But a simple refresh button saying location.reload(true) or window.location.reload() also does nothing.There is a button in there that works OK, window.close().Am I missing something fundamental about the nature of popup windows?I don't really want to have my help screens open in new browser tabs because I know people won't bother to close them.
I have an iframe that contains x.asp:Code:<iframe name=chat width=90% height=50% frameborder=0 src=x.asp></iframe>x.asp is refreshed every 1 second using metatag. The problem is that everytime x refreshes, x goes top so the last line is not visible.What I need is a javascript that when x refreshes, scroller automatically goes to the last line
View 1 Replies View RelatedI 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]....
I have used this code for UI tabs.
[URL]
I tried to get back the last visited tabs after page refresh using cookies. But I failed to set cookies here.