Chrome And Firefox Reloads The Page On Back Event?
Jul 23, 2011
We are developing an application with ASP.Net and C#. We have a back button (html link) on few pages, by clicking on back button it triggers the browser back event. So user will be able to see his last viewed results (by going only one level back).
We are calling "window.history.back();" function of Javascript to achieve this, but the problem is that its working fine in IE but not in Chrome and Firefox. Whenever user clicks on the back button, Chrome and Firefox reloads the page from server and execute all the server side events.
What we need is simply go to one step back without reloading or refreshing the page.
I'm working on a image slider, which will slide left to right and vice versa on mouser over event. the images are dynamically loaded from the database using ASP script. I use mootools.svn.js for the sliding implementation. and Ajax to pass the id of the image to another page as a query string. this is implemented in a onclick="getValue('<%= id %>')" event. This works fine in IE8, but when I test in Firefox 3.6 and Chrome the onclick event doesn't work. when I comment the mootools.svn.js, the onclick event get fired.
I am trying to trap the shift+click event of a DIV. Works in IE and Chrome but not in Firefox. Purpose of the code: The DIV provides a hidden link (no decoration) for an editor who wants to edit content. The DIV ignores a simple click (meaning a click without a combination of the shift key) to avoid accidental access to the casual surfer. Here is the logic of the code: DIV is clicked. call function to check for the shift key being depressed if the shift key were depressed during the "click", initiate access. If the shift key were not depressed, ignore the "click" Here is the HTML code:
I have two select lists that have option lists that are created from external XML lists that contain course offerings available at different locations. Each location has a different set of course offerings. When a user selects a location, the javascript code will hide / show the option entries that correspond to the course offerings for that location. If a user selects a course offering, the javascript code will show / hide the locations that offer those courses.
Click events are attached to each of the Option entries with the code below. The code works correctly with Firefox and Opera, but the click events are never triggered in IE, Safari or Chrome. The Chrome debugger seems to indicate that the click events get set up in Chrome (although I am not sure where JQuery saves event handler data). Each option entry has a unique ID tag.
$(".locn_option_select").click(function (locnevent) { // Set up click action on the option entries locnevent.preventDefault;[code].......
I have an add row button that duplicates the last row of a table and then updates the item number located in the first column of the table. I used clone() instead of append() b/c the third column has a dropdown box that is filled depending on the selection in a dropdown box located somewhere else on the form. If I use append(), it will not fill in this dropdown box, but if i use clone(), it will.My problem is that I created this form and it worked fine on ie until i added a doctype, and then it started reloading the page after it completed the function. I then tested it in firefox and it does the same thing regardless if it has a doctype or not. I have other jquery code on this page that works fine.html table:
I've got this form on my page that contains a search box and a select box full of employee names. When you type a few letters in the search box it scrolls through the listbox to the first match and then if you click on that name it executes a function. Today though one of my coworkers pointed out that some people would just hit enter inside the search box and he's right about that. So I looked around and found the solution for it, it's the onkeydown event I added to the search box. Weird thing is though when you type a name in the box and hit enter it executes properly and then the page immediately reloads :confused:Without the onkeybown event, hitting Enter still makes the page reload so it's gotta be something about the form.
Im developing a wordpress site for an Internet Radio station. have the flash radio stream plugin & the small chatroom/shoutbox type thing stay (at the front) so that a user can then freely browse the rest of the site on different pages, without the actual stream plugin and shoutbox being refreshed. I need it to stay at the front at certain positions (ie to the left of the content so its not blocking it), so having a pop-up window will not work as it will just disappear behind whatever window the user clicks.Ive had a quick look at Modal windows but (correct me if im wrong) they also "refresh" if a user was to go to a different page.
I've made the following script: $(document).ready(function(){ var showHide = $.cookie('menuStatus'); alert(showHide); /* Part that dosnĀ“t work. if (showHide==closed) { $("#menu").hide(); } */
$(".openClose").click( function(){ $("#menu").slideToggle("slow", function() { if ($(this).is(':hidden')) { //var state = "closed"; $.cookie('menuStatus', 'closed'); } else if ($(this).is(':visible')) { //var state = "open"; $.cookie('menuStatus', 'open'); } //alert(state); }); });
Now this is the example: [URL]. When page loads, you get an alert, with the var showHide, which should be open or closed. Problem is the if statement. I must say it was exciting to make this little script with jQuery. Especially setting the cookie, I couldn't have done it without the jQuery plugin. As you can see I tried to set a variable first but when page reloads, the variable was reset.
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.
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:
Prevents the page reload after clicking another anchor on the redirected page.
A description of the problem: User clicks a link to view the newest post of a topic, such as
Code:
[URL]
This link redirects automatically to the topic with an anchor to the latest post entry on the page:
Code:
[URL]
This is where problems start. On this page clicking any link which is an anchor causes the page to reload and then jump to the anchor.
My modification enables posting replies to topics via Ajax, and to support back/forward button functionality in browsers I must change the anchor in the script. As soon as it is changed the browser reloads the page defeating the purpose of Ajax!
So what can be done about that anchor? I'm thinking about passing it as another variable in the query string and then manually via JavaScript onLoad() to extract the anchor from the URL and then jump to it after the page has loaded. Would this work?
This JavaScript is not working in Mozilla Firefox and Google Chrome, can anyone please help me with this.. Thank you very much.. Please post your revised JavaScript if I am wrong..
<style type="text/css"> a {text-decoration: none;}
I am using the following code to hide one <div> and make another visible. It fires just fine in IE and Chrome. Also, the same page has other javascript links which do fire in Firefox as well.
[Code]...
ship_details and ship_update are the names of the DIV. Spelling is correct (and even MS Visual Studio suggests those names and I select from the drop down.)
I have an issue in which any and all jQuery function calls are broken in Internet Explorer and Google Chrome but it functions properly in Firefox and even Firefox doesn't give me any Javascript errors.[URL]..
the following line of code is NOT working in chrome/safari as it is supposed 2its working perfectly in firefox and Operaowever:$('#box8').delay(1100).animate({"left": "+=300px"}, 5000);in firefox/opera the div box slides from its place to the right 300pxbut in chrome/safari it suddenly jumps to the right and then slides to the left 300px leaving it half through the page!
The following script grabs a string (*.abc.org, e.g. from &sid=xyz.abc.org) from the current URL and changes it (to ABC:abc.org). Everything works perfectly in IE, but Firefox and Chrome appear to get themselves into an endless loop. When I check the URL, xyz.abc.org has successfully been changed to ABC:abc.org, but the page just seems to keep refreshing over and over.
var tomatch = /abc.org/i; var usrString = document.referrer; var is_a_match = tomatch.test(usrString); var newString = document.URL.replace(/[a-z]*.abc.org/, "ABC:abc.org"); if (is_a_match) { window.location.replace(newString); }
I think it has something to do with the ID of the frame, (from Googling the error and reading some other posts,) but can't figure out where to put the tag.
I am using dynamically generated forms with (unknown) unique names and id's. When I want to pass the form id with javascript to a function, I receive a message from Chrome (in the javascript console) that it can not read the property id of null.I investigated this some more, and found that chrome and firefox are not passing the parameter this.form to a function correctly. Normaly a popup should arise stating the id of the form. In IE it works, but in Chrome and Firefox it doesn't.
Is it possible to disable a button in firefox and chrome and should be enabled in IE. It is also fine with me if the button is made invisible. How will the scripting go in that case?