• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

The Cancel button behaves differently in Chrome and in Firefox.

 
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My current URL is https://tenant1:8443/ima/importEmployee.do?method=load.
The context rootpath is https://tenant1:8443/ima.
In my current URLpage, I upload a CSV file. This page has two buttons-- ok and Cancel and these buttons are what I'm having trouble with ( I will come to that part in a short while). The relevant JSP part is as follows.


Once I upload the CSV file and click on ok, the appropriate action class method is invoked and my url changes to -https://tenant1:8443/ima/importEmployee.do?method=save.

This page basically contains the import statistics, error messages for unprocessed records and such things.
This page also has an ok and a cancel button.
The corresponding JSP parts are as follows.



So, if I click on cancel in the second URLpage (https://tenant1:8443/ima/importEmployee.do?method=save), I go back to the first URLpage, i.e to
https://tenant1:8443/ima/importEmployee.do?method=load.
But this part behaves differently in Firefox and in Chrome browsers.
In Chrome, if I click on cancel in the second page, I can still see the uploaded file name( the hidden property in the first JSP is the file name ) in the first page. And if I click on ok, I can do the processing again as was done by clicking ok the first time on the first page.
However when I run my application in a Firefox browser, if I click on cancel in the second page, the uploaded file name says 'no file selected' in the first page. Hence to import Employees again, I need to upload a new/same CSV file again.

I don't want the file to be present in the first page when I click on cancel in the second page even when I run my application in Chrome. Yes, I require the file name to be a hidden property. This is because depending on the data in the file, different kind of processings are done and some of them require to take additional inputs from user on another page and a third page does the processing. So the file name should be passed on to the form but I don't want the user to upload the file again.

However in the event the user clicks on cancel, I don't want the file name to be retained in the first page. But this isn't happening.

So I have two questions. Why is the behaviour different in Chrome and in Firefox and is there a way I can correct the way it behaves in chrome?

Thanks for your help.
Chan.
 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have posted this question in StackOverflow and the link for that is--

http://stackoverflow.com/questions/22033620/cancel-button-behaves-differently-in-firefox-and-in-chrome.
 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is resolved.

Folks at work said that this cancel button behaviour is a known behaviour. Seeing the file name again after clicking cancel in chrome is ok. We shouldn't see it in Mozilla.

Sorry for the confusion and thanks for going through my question.
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic