I have a page where users can filter a list of links using javascript clicks. The user then clicks a link in that list, views the page and then clicks back on the browser to view the rest of the list but the javascript options they filtered in the list are gone resulting in them having to do it all over again. Is there a solution to this?
Would it work if I store their selections in a cookie each time they click a javascript button and then when they visit a link and click back (to what is presumably now a cached page) will I be able to have javascript that will read the cookie and reset their options again or is the cookie not loaded on a cached page?
Are there any common solutions to this kind of thing?
Okay, so I've just installed a javascript that redirects to any random page from a specified list. The problem with it is, it's in an iframe and works as sort of an advertising area. So on the mainpage where the iframe has been placed, whenever someone uses the back button, it just keep going back in the iframe and choosing random pages. The back button doesn't work on the mainpage and instead is used in the actual iframe.
I'm not sure if this is a problem with the iframe or the script, and I don't think I have the mental capacity to figure it out so I'd really value some help! Oh, and apparently the problem doesn't occur when using Firefox. Code:
Basically, I have a page that I load with 10 input fields. If users have JS enabled I want to hide 5 of these fields so as to reduce clutter. If the user needs these extra fields an "Add" button can be used to display the hidden fields one by one.
Once the fields a filled in the user submits them for validation and if there are any error They can "Go back" to make some changes. The whole process works great in FF & Opera but IE lets me down because if you use the Browser "Back" button the Javavscript gets executed even though it should be loaded out of cache.
In one of my pages, I use javascript (AJAX) to populate one mulitple select field based on user's click event on another control. I noticed that when I navigate back to this page by clicking browser's "Back" button, the changes made to the multiple select is not preserved. (It shows the initial value). While all the other user selections are preserved.
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?
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:
This is hard to explain but here's my predicament. I have 2 drop down menus in a form for "Main Category" and "Restaurant Type". My boss wants it so when Restaurant is chosen from the first drop down, the 2nd drop down appears, which is what this code below is already doing.
The problem is if you submit the form, then decide to go back and change your Restaurant type, the drop down for Restaurant Type is missing. You can get it to come back by switching to another main category, then switching back to Restaurant. Code:
I have a page that comes up through XMLHttpRequest and inside that page there is a button.
This button doesnt work the same as the buttons outside of the buttons on the main page. Sorry I don't fully understand AJAX and how it works, I know XMLHttpRequest is a bit like an iframe (in the sense that it brings data from another page).
Basically I have a shopping basket, and this basket sits at the top, I load up the database with XMLHttpRequest which brings up results, each result has a button next to it which calls the basket and adds themselves to it but they don't.
If i get the exact same button but use it outside of the XMLHttpRequest div it works.
I 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
I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window? I remember I had before a problem because I wanted to bring back iframe and not top window as it did. But today I tested my Facebook app and was surprised to see it works as I need which means it brings back/forward iframe window and not top. Is it possible that Facebook has some javascript code which does that or is this normall behaviour?
I have a graphic with a rollover for site navigation on each page. I put the page to go back to in the rollover javascript.
My question is, is it possible to put in some code that will refer the visitor back to whatever page they came from rather than one I specify?
The rollover is combined with a tooltip script to make matters fun (below). However, I'm quite happy to lose the tooltip to have the link perform as a back button.
<a href="../index.asp" onmouseover="document.images['link1'].src=img2.src; showtip(this,event,'Back to home page');" onmouseout="document.images['link1'].src=img1.src; hidetip()";><img src="bhome.gif" name="link1" border=0></a>
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?
The site that I'm currently working on is related to a computer game, and I'm creating an interface similar to the game using js for rollovers and imagery changes.
However, one thing that web browsers have that the game doesn't is a "Back" button. I don't want to disable it--I hate when sites do that--but I want to makes sure that button changes that happen going forward also happen going backward.
That said:
1: Is there any way to force a function to run when the back button is pressed? And if not...
2: Does the body onLoad event work when the page is returned to using the back button?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Back Button Test </title> <script language="JavaScript"> <!-- function createDiv(){ var div = document.createElement('div'); div.innerHTML = TEST DIV' document.body.appendChild(div); } //--> </script> </head> <body> <input type="button" value="Create Div" onclick="createDiv()"> </body> </html>
I using this code sample to create some divs in Firefox and IE6. After going to another site ex:google.com..if I click in the back button the created divs remain in Firefox, like I want, but doesn't in IE... Do you know what's wrong?! Is this an IE6 lack?!
I have used thickbox js library to display 'popup contact cards' on a private website. which requires the user to login, I chose this as it's far better than using real popup widows, or full windows do display the small amount of info (name, position, and phone number).
However the client has had trouble with some users clicking the browser back button to exit the 'thickbox' screen instead of the 'close' text in the thickbox header bar (or using the esc key as you can in the latest version of Thickbox), clicking the back button sometimes leads to the user being logged out returning them to the 'please login' page.
I would like to disable the back button in IE7 and IE8. I assume the best way is to use window.open. I tried below and it disabled the IE back button but doesnt show the menu items, url bar etc.
Code: <a href="#" onClick="window.open(theURL, 'newpage.html', 'fullscreen=yes, scrollbars=auto')">go to page with disabled IE back button</a>;
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
Is there anyway to detect when the back button has been pushed? I have three frames, and it requires three pushes of the back button to get back to the previous "window". I would like to detect when the user pushes it and send them back in one go.
Can someone point me to a script that will allow me to implement a "back button" in an HTA, since there is no history for HTA's. Understand this requires an array, is there any sample code out there ?