<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I just tried it in Safari and it had no effect. :(<br>
<br>
On 22/09/2011 08:58, --[ UxBoD ]-- wrote:
<blockquote
cite="mid:2e585be7-2ac4-46ed-bea0-9fd1ab103a73@office.splatnix.net"
type="cite">
<style type="text/css">p { margin: 0; }</style>
<div style="font-family: Courier New; font-size: 10pt; color:
#000000">Jules, I have this working by adding into the top of
new_dropoff.tpl:<br>
<br>
var unload_msg = "You will cancel your upload!";<br>
var ignore_unload = true;<br>
<br>
$(document).ready(function(){<br>
<br>
function doBeforeUnload() {<br>
if(ignore_unload) return; // Let the page unload<br>
<br>
if(window.event)<br>
window.event.returnValue = unload_msg; //
IE<br>
else<br>
return unload_msg; // FF<br>
}<br>
<br>
if(window.body)<br>
window.body.onbeforeunload = doBeforeUnload; //
IE<br>
else<br>
window.onbeforeunload = doBeforeUnload; // FF<br>
<br>
and then in the submitform() function, around line 330, the
following code:<br>
<br>
document.dropoff.submit();<br>
ignore_unload = false;<br>
<br>
Now once a user clicks Dropoff Files and they attempt to
navigate away a popup will ask them if they are sure.<span><br>
<span name="x"></span>-- <br>
Thanks, Phil<span name="x"></span><br>
</span><br>
<hr id="zwchr">
<blockquote style="border-left:2px solid rgb(16, 16,
255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<style>p { margin: 0; }</style>
<div style="font-family: Courier New; font-size: 10pt; color:
#000000">Hi Jules, A test user informed us that if you are
performing a dropoff and navigate away from the page the
upload is cancelled. Would it be feasible to add some JS
code for using onbeforeunload() to warn the user ?<span><br>
<span></span>-- <br>
Thanks, Phil<span></span><br>
</span><br>
</div>
<br>
_______________________________________________<br>
ZendTo mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to">ZendTo@zend.to</a><br>
<a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a></blockquote>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ZendTo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to">ZendTo@zend.to</a>
<a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CITP CEng
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
'It's okay to live without all the answers' - Charlie Eppes, 2011
'All programs have a desire to be useful' - Tron, 1982
'That is the land of lost content,
I see it shining plain,
The happy highways where I went,
And cannot come again.' - A.E. Houseman
</pre>
</body>
</html>