html - how to keep web page displayed during JavaScript alert in Chrome & FireFox for a VB ASP.NET web app -


is there way keep page displayed in background while alert popup displayed? (ie keeps displayed)

in vb asp.net web app, popup alert using javascript alert(). (see code below) when alert pops up, chrome , ff web page goes blank until user hits ok, re-displayed. (ie doesn't have problem)

' shows javascript alert_message @ browser, because msgbox doesn't work there. private sub alert(byval alert_message string)     dim msg string     msg = "<script language='javascript'>"      msg += "alert('" & popup_alert_title & "\n\n" & alert_message & "');"      msg += "<" & "/script>"     response.write(msg) end sub 

sample usage within visual basic 2013 asp.net web app..........

function sample_usage()     alert("internal error 111.") end function 

javascript executes on single thread. alert boxes interrupt thread, causing hang until user closes it. see this jsfiddle example.

<div id="messages"> </div>  <script> alert('test'); $('#messages').text( 'alert done!' ); </script> 

what's happening have javascript reloading portions of page. ie executing things in particular order, , chrome , firefox doing things in different order (or doing things faster/slower). in ie, page underneath has finished (or not started) loading/reloading while in chrome , firefox page in middle of loading/reloading.

unfortunately, there's no simple solution this... answer involve changing javascript bit. i'd recommend using blockui , showing things alerts after timeout (to give other parts of javascript chance finish).


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -