[ZendTo] Re: "Leave This Page" warning when dropping off a file
Gray D. McCord
gdm at sangabriel.com
Tue Nov 25 22:40:55 GMT 2014
I ran into this quite a while back. I have two possible things you can try.
Both involve edits to the new_dropoff.tpl file:
SOLUTION 1:
First, my solution, which works for me is to edit the submitform() script in
the new_dropoff.tpl file by setting "ignore_upload = true;² in the submit
form script and my problem went away. Now, my Zendto is highly customized
with a JS file uploader and php5.5, so this may not work for you. Also be
sure to make sure it doesn¹t break something on other browsers.
<script type="text/javascript">
function submitform() {
if (validateForm()) {
document.fileupload.submit();
ignore_unload = true; //TODO: Changed to true to get rid of Chrome
error. Need to figure out why the error occurs.
}
}
</script>
SOLUTION 2, from Jules, who is the Zendto owner and actually knows what he¹s
doing:
From: Jules [mailto:Jules at Zend.To]
Sent: 02 January 2014 11:15
To: John Webber (NBI)
Cc: ZendTo Users
Subject: Re: FW: Issue with Chrome browser - "Leave this Page"
I've got a quick fix for this. Unfortunately it means you can navigate away
from (and hence abort) a running upload, but it stops the Chrome warning, so
is better than nothing.
You want to edit /opt/zendto/templates/new_dropoff.tpl file:
Find the start of the "submitform" function, and add the last line of this
little code snippet:
<script type="text/javascript">
function submitform() {
if (validateForm()) {
window.onbeforeunload=function(){}
Jules.
Good Luck!
Gray McCord
Adapt, Mutate, Migrate, or Die
-C. Darwin
From: Everton Bruno Bernardi <ebbernardi at gmail.com>
Reply-To: ZendTo Users <zendto at zend.to>
Date: Tuesday, November 25, 2014 at 3:55 PM
To: ZendTo Users <zendto at zend.to>
Subject: [ZendTo] Re: "Leave This Page" warning when dropping off a file
Hello Andrew.
We also suffer from this problem. Please let me know if you find a solution.
Regards
Everton Bruno Bernardi
Em 25/11/2014 18:38, "Andrew Martin" <amartin at xes-inc.com> escreveu:
> Hello,
>
> I recently installed Zend.To 4.11 on Ubuntu 14.04. It works great, however I
> notice that when dropping off a file using Chrome, the user is prompted to
> either "Stay on This Page" or "Leave This Page" with the message "If you leave
> this page, you will abandon this drop-off". The correct behavior is to
> actually click "Leave This Page" to initiate the upload, but this is confusing
> to users. Is this normal, or is there a way to configure Zend.To to not
> trigger this browser message?
>
> Thanks,
>
> Andrew Martin
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
--
This message has been scanned for viruses and
dangerous content by MailScanner <http://www.mailscanner.info/> , and is
believed to be clean. _______________________________________________ ZendTo
mailing list ZendTo at zend.to
http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20141125/b80eba61/attachment-0001.html
More information about the ZendTo
mailing list