jquery dialog not opening constanly in frames on window blur event -


i need trigger jquery dialog box on window blur event. not throwing dialog due presence of frameset multiple frames in page. created empty div in 1 of frame , appended generated dialog it. throwing dialog once. need throw every time blur event occurs window.

thanks in advance.

browser: chrome, firefox , ie9.

jquery lib included: jquery-1.3.2.js, jquery-ui-1.7.2.js, jquery-ui-1.7.2.css

more info:

i have created empty div in 2nd frame

<div id='testpop'></div> 

and used following code in common js file trigger blur event

$(window).blur(function() {     confirmbox(); });  function confirmbox() {     var timer;     $('<div id="confirm" style="display: none"><p>are sure?</p></div>').dialog({         closeonescape: false,         resizable: false,         position: top,         width: 500,         modal: true,          open: function(event, ui) {             timer = settimeout(function() { alert("logout"); }, 30000);          },         buttons:                                 {                                     "logout": function() {                                         alert("logout");                                      },                                     "resume": function() {                                         $(this).dialog("close");                                         cleartimeout(timer);                                     }                                 }     });     if ($(window.frames[1].document)) {         $('#testpop', window.frames[1].document).html($('#confirm').parent());         $('#testpop', window.frames[1].document).show();     } } 

based on code throwing dialog box once in page first blur event. next time blur event not triggering properly.

please let me know if have missed in code.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -