javascript - Can I Load Window After Click? -
i have custom modal box (just browser's alert()
)
usually, using alert()
browser pauses underneath page rendering , executions,
how same behavior of restricting rest of window load unless 1 confirms ok
in modal element?
so how to
pause window load -> show modal -> (ok) -> continue window load
new edit
instead of stopping page load, why not remove of page show popup, place document ie using jquery...
var pagebody = $('body').html(); //copies body of page pagebody = $('body').html(""); //delete body /* awesome code here*/ $('body').html(pagebody); //place body
this allow page load, remove it, execute code place back. other method below not work stopping page, stop everything including other code running.
old answer
you use
window.stop(); //works in browsers ie if ($.browser.msie) {document.execcommand("stop");}; //works in ie,
document.execcommand works in ie, stop of ff, ns , other browsers' functions. displaying gif's animation example. using "if browser ie" makes these 2 codes work in browsers.
this code pause execution of page. clicking stop button on page need reload start page again..
i advise placing fullscreen white div behind popup box above popup give idea of popup there while user none wiser rest of page has stopped loading
Comments
Post a Comment