I have been using a javascript code to display a "Please wait..." message on screen but it seems to work in some instances and not in others.
Please assist me with javascript code that works in all instances
Issue 1:-
it doesnt pops up with d wait msg ven v click on buttons..
the buttons are not submit buttons.. instead on clicking dat button it calls a fnformsubmit() userdfnd funtion..
Issue 2:--
even after d response cums the wait msg window doesnt close.. it hangs in d backgrnd..
The foll code is used in the footer.jsp file... Please assist...
<html>
<head>
<script type="text/javascript" src="/js/os/jquery-1.5.1.min.js" ></script>
<script type="text/javascript" src="/js/os/jquery-ui-1.8.14.custom.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="/js/os/jquery-ui-1.8.14.custom.css">
<script type="text/javascript">
for (var i = 0; i < document.links.length; i++) {
var attrib = document.links[i];
if (attrib.addEventListener) {
attrib.addEventListener('click', attachModalDialog, false);
} else if (attrib.attachEvent) {
attrib.attachEvent('onclick', attachModalDialog);
}
}
function attachModalDialog(evt) {
//alert('for Click event.');
$(ModalDialog).dialog({
modal: 'true',
title: 'Please Wait...',
width: 400,
height: 300,
closeOnEscape: false
}).dialog('open');
return true;
}
</script>
</head>
<body>
<div id="ModalDialog" style="display:none;">
<pre>
Server side process is in-progress.
Please wait.....
</pre>
</div>
</body>
</html>
Please assist me with javascript code that works in all instances
Issue 1:-
it doesnt pops up with d wait msg ven v click on buttons..
the buttons are not submit buttons.. instead on clicking dat button it calls a fnformsubmit() userdfnd funtion..
Issue 2:--
even after d response cums the wait msg window doesnt close.. it hangs in d backgrnd..
The foll code is used in the footer.jsp file... Please assist...
<html>
<head>
<script type="text/javascript" src="/js/os/jquery-1.5.1.min.js" ></script>
<script type="text/javascript" src="/js/os/jquery-ui-1.8.14.custom.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="/js/os/jquery-ui-1.8.14.custom.css">
<script type="text/javascript">
for (var i = 0; i < document.links.length; i++) {
var attrib = document.links[i];
if (attrib.addEventListener) {
attrib.addEventListener('click', attachModalDialog, false);
} else if (attrib.attachEvent) {
attrib.attachEvent('onclick', attachModalDialog);
}
}
function attachModalDialog(evt) {
//alert('for Click event.');
$(ModalDialog).dialog({
modal: 'true',
title: 'Please Wait...',
width: 400,
height: 300,
closeOnEscape: false
}).dialog('open');
return true;
}
</script>
</head>
<body>
<div id="ModalDialog" style="display:none;">
<pre>
Server side process is in-progress.
Please wait.....
</pre>
</div>
</body>
</html>
Comment