Browser Back Button click event javascript

Ads

 
 

Share on Google+Share on Google+

Saloni
Browser Back Button click event javascript
0 Answer(s)      4 years and 10 months ago
Posted in : JavaScript Questions

I am using the below code but window.onBeforeUnload is not working with back button.. how can i apply the below code for the click event of back button?

  window.onBeforeUnload = function () {
            if (document.referrer.indexOf('Create') > 0 || document.referrer.indexOf('Edit') > 0) {

                if (document.referrer.indexOf('/BatchProcessing/GasBottleBatch') > 0)
                    document.location = '/BatchProcessing/GasBottleBatch/Edit/' + getParameterByName('P_BatchId');
                else if (document.referrer.indexOf('/BatchProcessing/BulkLpgBatch') > 0)
                    document.location = '/BatchProcessing/BulkLpgBatch/Edit/' + getParameterByName('P_BulkBatchId');
                else
                    history.back();
            } else {
                history.back();
            }
            return false;

        };
Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
Browser Back Button click event javascript
Browser Back Button click event javascript  I am using the below code but window.onBeforeUnload is not working with back button.. how can i apply the below code for the click event of back button? window.onBeforeUnload
browser back button
browser back button   hi...i created one page in JSF.that page had three form division.in first form one add button is there.if i click that button move to second form,then i click browser back button ,it moves on another page.so
Advertisements
Browser's back button
Browser's back button  how to redirect to a home page when browser's back button is pressed in jsp instead of displaying the previous page
Enable Browser's back button
Enable Browser's back button  how to redirect to a home page when browser's back button is pressed in jsp instead of displaying the previous page
Browser's back button
Browser's back button  how to redirect to a home page when browser's back button is pressed in jsp instead of displaying the previous page
How to disable back button in browser using javascript
that will disable the working of Back button in Browser: <SCRIPT type="...There are times while developing a website, we need to disable back button... of the time the back button is disabled because a user can hit back
iphone button click event
iphone button click event  Hi, How to write iphone button click event? Thanks   Hi, Here the method declaration: -(IBAction) myMetod...{ NSLog(@"Button clicked"); } Thanks
disabling the browser's back button
disabling the browser's back button  I have following requirement, After submitting the form, user should not navigate to the previous page. I have tried with onbeforeunload(), but it is not working properly. Please help me
code to disable back button of browser
code to disable back button of browser  code to disable back button of browser
code to disable back button of browser
code to disable back button of browser  code to disable back button of browser
how to disable browser back button
how to disable browser back button  Am doing a web application in that how to disable browser back button using java script
java swing button click event
java swing button click event  java swing button click event   public void doClick()   Java Swing Tutorials
click on back button go to the login page
click on back button go to the login page  now when i click on back button the page show that page on where i came from and it shows the session expired but i want when i click a back buttob then it should show a login page
How to disable browser back and forward button after logout [in struts2 or jsp]
click the back button of the browser more than one time...How to disable browser back and forward button after logout [in struts2 or jsp]  How to disable browser back and forward button after logout
Browser Back Button Disable/Hide/Invisible using Java Script
Browser Back Button Disable/Hide/Invisible using Java Script  Dear Sir, Please Help..., Q: How to Write Code For Browser Back Button Disable... know reply me...   <SCRIPT type="text/javascript">
how to disable back button of a browser after logging in? - JSP-Servlet
how to disable back button of a browser after logging in?  how to disable back button of a browser after logging in?  where is the source code
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
Click event
Click event  hi............ how to put a click event on a particular image, so that it can allow to open another form or allow to display result in tabular form????????/ can u tell me how to do that????????/ using java swings
Back button
Back button  how to redirect to a home page when a back button is pressed in jsp instead of displaying the previous page
jquery button click
jquery button click  jquery button click - I have created a button in JQuery but the problem is that it's not detecting click. What could... to create a button event in JQuery. You can edit it as per your requirement. In Header
Browser Back/Forward - Struts
Browser Back/Forward  Hi, Greetings to all. I have developed a web application using Struts 2. Now, i want to enable browser back/forward/bookmarking in that. Can anyone post me some links/tutorial/examples or how to go
uinavigationcontroller back button action
will display the back view on click of a button in my iPhone and iPad based application. Give me any code for uinavigationcontroller back button action method. Thanks...uinavigationcontroller back button action  Hi, Tell me how to back
back button in jquery
back button in jquery  Creating a back button in JQuery   <script src="/javascript/jquery.min.js"></script> <script type="text/javascript">     $(document).bind("mobileinit", function(){     
on click button php
on click button php  Function in PHP for on click button
navigation item back button
navigation item back button  I wants to add a navigationBar on the top of my UIWebView also a navigation item "back button". can anyone please explain how the back and refresh button works
PushViewController back button
PushViewController back button  How can i hide the back button... it always show back button.   In your ViewDidLoad method just hide the navigation back button as given in the code. navigationItem.hidesBackButton = YES
disabling back button
press back button i again reach to the back page ie. authentication page so if any one can help me how to disable this button...disabling back button  hi, i am trying to make an application and i
handling Button Event in iphone
handling Button Event in iphone  handling Button Event in iphone
javascript event handling examples
javascript event handling examples  javascript event handling examples   var handleClick = function(e) { // Older IEs set the `event... == 'some_class') { // Handle this click
passing values on button click
passing values on button click  Please help me to solve this issue.I want to pass a value assigned to button to another view upon button click in xcode
Tutorials   
Java Spring Hibernate Struts Training code for programming How can I dynamically load user-entered data as content of jquery dialog? java webcam integration question java coding Fix Scrollbar position in a checkboxList after postback Information Save Alert Country wise redirection to files Interface in javascript connect database with javascript Zip Code ZipCode how to validate the email login How to play FLV video files on Ipad using HTML code or javascript code? Nitobi Grid is not working in IE10/IE11 jquery issue plese help RegEx Tree structure from json whose parents can be dragged and dropped from child newyorklife insurance getElementById not working javascript code for search in html file Implement The Skeleton Code Implement This Skeleton Code Mobile Automation using Appium Computer forensic application Java: Searching a string from doc files java linked list urgent !!! java linked list urgent!!! library management library management library management library management question Html form using JavaScript to display the table content java how to prevent no from unroundin off on clicking text box again in JSP and Jquery graph generation from xml design file display data from database in textbox when id entered in textbox Javascript Code for all fields how to get HTTP GET request value using javascript array Javascript Querry autocomplete(): Spring mvc with jquery: I am not getting correct value in the text filed. Please help me Create SpreadSheet same as excel using java applet Create SpreadSheet same as excel using java applet How to change focus among multiple select boxes? Write JQUERY Code Write JQUERY Code Converting jsp variable to java variable java

Ads

 
Advertisement null

Ads