Note that there are some explanatory texts on larger screens.

plurals
  1. PORequire confirmation before opening fancybox
    text
    copied!<p>I need the user to confirm that he wants to end the current before opening the fancybox to create a new game. </p> <p>I have both tried to stop onClick event propagation: <a href="https://stackoverflow.com/questions/387736/how-to-stop-event-propagation-with-inline-onclick-attribute">How to stop event propagation with inline onclick attribute?</a></p> <pre><code>&lt;a href="../Dialogs/CreateGameDialog.aspx" class="createGameLink showDialog" onclick=" if(!confirm('&lt;%# Strings.LoggedIn_ComfirmStartNewGame %&gt;')){ disabledEventPropagation(arguments[0]); return false;} return true;"&gt; &lt;script type="text/javascript"&gt; function disabledEventPropagation(event) { if (event.stopPropagation) { event.stopPropagation(); } else if (window.event) { window.event.cancelBubble = true; } } &lt;/script&gt; </code></pre> <p>And tried to unbind/bind fancybox based on confirmation results: <a href="https://stackoverflow.com/questions/3654085/unbinding-fancybox-on-thumbnail-fade">Unbinding Fancybox on thumbnail fade</a></p> <pre><code>&lt;a href="../Dialogs/CreateGameDialog.aspx" class="createGameLink showDialog" onclick=" if(!confirm('&lt;%# Strings.LoggedIn_ComfirmStartNewGame %&gt;')){ $('.createGameLink.showDialog').unbind('click.fb'); return false;} else{ bindCreateGameDialog(); return true;}"&gt; &lt;script type="text/javascript"&gt; $('.createGameLink.showDialog').setFancybox( { 'height': 400, 'width': 200 } ); &lt;/script&gt; </code></pre> <p>setFancybox is a wrap of <code>$.fn.fancybox</code>.</p> <p>But none of the approaches worked.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload