I currently have a dialog box that automatically displays each time the page is loaded. However, I have functionalities such as a search so when a user searches for an entry, it will then display the popup box again since the page is being loaded again.
How can I get it so that the dialog box only displays the first time the page is loaded?
Here is my HTML code for the dialog box:
<!-- Dialog box -->
<div id="dialog-form" title="Instructions">
<form>
<fieldset>
<ul>
<li>These are instructions</li><br>
<li>that should be displayed</li><br>
<li>inside the dialog box</li><br>
<li>on the first load only</li>
</ul>
</fieldset>
</form>
</div>
JavaScript:
$( function() {
var dialog = $( "#dialog-form" ).dialog({
autoOpen: true,
height: 400,
width: 350,
modal: true,
buttons: {
OK: function() {
dialog.dialog( "close" );
}
}
});
});