History.go(-1)
Feb 24, 2005
I'm having a bit of a problem with IE and the history.go(-1).
I have script in php that adds a new vehicle to the DB. Before adding it checks to see if all fields are populated. If not it displays an error message and then provides a back button in the form of an submit button and onclick="history.go(-1);return false;
In IE when I click back I get an error message ... see attached screen dump.
I click ok and then click back ... it says the same error message.
I click the back button once more and it then takes me 2 pages back from the current page.
I dont experience the same problems in Firefox ... all works great.
I also have header("Cache-control: private"); //IE 6 Fix set at the top of the page.
View 10 Replies
ADVERTISEMENT
Dec 4, 2005
Is there a way to obtain the last page visited? I don't want to go to
that page, I just want to be able find out what page they came from,
the url of that page. Is this possible?
View 20 Replies
View Related
Jul 20, 2005
We use a three-window frameset for online manuals. The "main" window
contains our document. Since the documents have hyperlinks between
them for related topics, we have "return" links built into a
navigation bar on some of the pages. Most of the time these work
fine, but if the person clicked on the top or left frame before
clicking on the "return" link, the wrong frame is changed.
Does anybody know how to alter the script so that only the main
document window is in focus? Here's the script we use in the page:
<a href="javascript:history.go(-1);">Back</a>
By the way, this is for a company Intranet - with all users on IE5.5
as a minimum.
View 1 Replies
View Related
Jul 24, 2001
is there neway using javascript that you can detect if a vistor has clicked a link?
the reason i ask is that i need to make only certain links on an area of a page to be a certain color if they have been linked, but other ones remain unaffected. i only have control over a few links, as it is an asp application for someone to download and have inside their pages
View 7 Replies
View Related
Aug 3, 2007
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?
View 2 Replies
View Related
Jun 2, 2002
I just finished adding a purchased shopping cart to a site and it's part php and part javascript.
The first problem is this little piece of code:
<A HREF="javascript:history.go(-1)">Back<A>
It works fine in IE6 but, wil only work once in Netscape6.2...What gives?
View 3 Replies
View Related
Jul 23, 2005
I have an Apache PHP enabled webserver and want to know from where users are coming from.
Understand I want the last surfer's browser visited url. I imagine I can do this with some kind of interraction between 2 scripts : one client side, one server side. The client one send the URL and the server one write it in the right log file....
View 4 Replies
View Related
Jul 23, 2005
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?
View 1 Replies
View Related
Aug 4, 2005
I search for a way in javascript to prevent browser from caching my
HTML page in its "history" and "temporary files" if there is any .
View 1 Replies
View Related
Mar 7, 2007
I have a one-page site that uses 4 different links to show or hide 4
different content DIVs. Because each piece of content isn't a
separate page, a user who clicks the back button after clicking one of
my links will be taken away from my site. Is there a way for me to
use a JavaScript function to write a history entry each time they show/
hide a layer so that if they do click the back button they aren't
navigating away from my site? I've noticed that this only affects
Internet Explorer...I do not need this for FireFox.
View 1 Replies
View Related
Aug 3, 2009
Is there any way to get browse history list ? with java script ?
View 3 Replies
View Related
Jan 11, 2007
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?
View 1 Replies
View Related
Nov 15, 2007
I want a page should not maintain history.what code in javascript.
View 1 Replies
View Related
Nov 21, 2007
i need go to back page using history.back() but this page dont refresh, i need this
how ican refresh the back page?
View 2 Replies
View Related
Sep 22, 2005
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 ?
View 2 Replies
View Related
Feb 14, 2006
Is it possible to force an entry into the browsers history without actually changing pages? I want to change the history based on a tabbed interface so that when linking away from one of the tabs a back button will return me to the correct tab or even the browser back button for that matter.
View 1 Replies
View Related
Nov 6, 2006
When we signout the form How can i disabling back button and,not only disabling back button but also delete history from browser.Suppose i used
<script language="javascript" >
javascript: window.history.forward(1);
</script>
to disable back button , its working.when i go to back list and click previous histories it shows data. so data hiding is important to my project. how can i delete browser history
View 9 Replies
View Related
Aug 6, 2009
<html>
<head><title>Back, Reload, and Forward Buttons</title>
</head>
<body>
[Code].....
how to display the number of history entries properly without having the code not run...any pointers?
View 2 Replies
View Related
Nov 22, 2006
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 Related
Sep 11, 2002
I'm designing a web site and I designed an error page with .htaccess so that when someone types in an incorrect URL, it takes them to my customized page. Well, I used server-side programming to make it log the bad URL and check against a database if the there is a good URL matching the bad one. If so, it redirects to that page instead of giving the error. It's a good, well-written script done by me, I'll give it to anyone that requests it.
What I want to know is if JavaScript can prevent a page from being logged in the visitor's browser history.
You see, when they click the back button, the revisit the error page and it relogs the bad URL.
Is this possible in Javascript? Code:
View 4 Replies
View Related
Feb 14, 2011
My clients have a, "Family Violence" Prevention website and they have asked me to create them an "Exit" button so that the users could escape the page quickly if they heard their abusive partners.
I added the "javascript:document.location.replace("http://www.google.com")" to the button to disable the back button, but it only works on the last page viewed.. if they viewed more than one page on the website it takes them back to the page before the last page viewed.Is there a way to remove all pages from a domain name? or remove all browser history before that?
View 1 Replies
View Related
Mar 11, 2011
How can retreive the URLs from browsers history. My requirement is to show the links which user visited before visting my website as thumnails.
View 1 Replies
View Related
Jul 23, 2005
Can 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?
View 4 Replies
View Related
Jan 18, 2007
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?
View 2 Replies
View Related
Mar 30, 2009
I'm making a dice program, that randomly draws x amount of times for x sided die. I decided to add on a "history" feature to this program--displaying the previous rolls (unlimited I imagine) and to show the math that comes from that equation. Everything works perfect except for the history function.
I've got a div area sectioned off with the id divhistory. At the end of the dice rolling program it calls function fhistory(z). Where z is the string that displays the random rolls and total (1 + 3 + 2 = 6).
Heres the code I've been fusing over. I imagine it's horribly off--but I'm also terrible with arrays it seems...
View 2 Replies
View Related
Oct 4, 2005
how I can create a link that goes back 2 steps in the history, but opens this in a new window? I've searched for this but no success so far.
View 4 Replies
View Related