I have a dialog box (Dialog A) that lets the user know a page will
take a minute or more because a lengthy report is being generated.
Once the report has generated another dialog box (Dialog B) is
displayed saying the report has been generated and giving further
options through dialog buttons.
The problem is that depending on how attentive the end user is Dialog
B could load on top of Dialog A requiring extra clicks and confusing
the end user.
I would like to use a timer to make Dialog A fade away after 10-15
seconds but am having trouble finding an example to do this. If
someone could post example code or provide a link to a page that would
explain how to do this, I would be eternally grateful.
The script itself is very vanilla but I will provide it below.
<script type="text/javascript">
$(document).ready(function() {
<cfoutput>
var #toScript(trimmed, "whichDebtType")#
var #toScript(whichval, "val2seek")#
</cfoutput>
if(whichDebtType == 0) {
var jicon = '<span class="ui-icon ui-icon-alert"
style="float:left;
margin:0 7px 50px 0;"></span>'
var jid = 'No value provided for ' + val2seek +
'<br>Click OK to
set report parameters';
var jtitle = 'Missing Value for Report';
var $dialog = $('<div></div>')
.html(jid)
.dialog({
bgiframe: true,
autoOpen: false,
modal: true,
//buttons: {"OK": alert('okay')},
buttons: {
"OK": function() {
//do something;
ColdFusion.navigate('Reporting.cfm','center');
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
},
title: jtitle })
$dialog.dialog('open');
}
});
</script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---