[<li class="reponse_formulaire reponse error">(#ENV*{erreur})</li>]
</li>
</ul>
- [<p class="boutons"><input type="submit" class="submit" onclick="jQuery(window).unbind();" name="confirmer_previsu_forum" value="(#ENV*{bouton})" /></p>]
+ [<p class="boutons"><input type="submit" class="submit" onclick="jQuery(window).off();" name="confirmer_previsu_forum" value="(#ENV*{bouton})" /></p>]
</fieldset>
<br class="clear" />
<script type="text/javascript">/*<![CDATA[*/
-if (window.jQuery){ jQuery(function(){
+if (window.jQuery){ jQuery(function($){
var confirm_quit = true;
- jQuery(window).unload(function() { if (confirm_quit) alert('<:forum:forum_attention_message_non_poste|texte_script:>');jQuery(window).unbind();});
- jQuery(window).on('beforeunload', function(e){ jQuery(window).unbind();if (!confirm_quit) return;e.returnValue='<:forum:forum_attention_message_non_poste|texte_script:>';return e.returnValue; });
- jQuery('fieldset.previsu').closest('form').next('form').bind('submit',function(){
+ $(window).on('unload', function() {
+ if (confirm_quit) alert('<:forum:forum_attention_message_non_poste|texte_script:>');
+ $(window).off();
+ });
+ $(window).on('beforeunload', function(e){
+ $(window).off();
+ if (!confirm_quit) return;
+ e.returnValue='<:forum:forum_attention_message_non_poste|texte_script:>';
+ return e.returnValue;
+ });
+ $('fieldset.previsu').closest('form').next('form').on('submit', function(){
confirm_quit=false;
});
});}