Dialog open if recordset is empty?

Dialog open if recordset is empty?

Hi,

I am trying to use a Dialog within my webpage. I have a recordset which returns a email address.

I would like for the Dialog only to open if the recordset is empty.

This is Script so fare

  1. <script>
  2. $(document).ready(function() {
  3.   $(function() {
  4.     $( "#dialog-message" ).dialog({
  5.       modal: true,
  6.  autoOpen: false,
  7.       buttons: {
  8.         Ok: function() {
  9.           $( this ).dialog( "close" );
  10.         }
  11.       }
  12.     });
  13.   });
  14.   });
  15.   </script>


  16. <div id="body">

  17.  <% If Email.EOF And Email.BOF Then %>

  18. <div id="dialog-message" title="Error No Email address found">
  19.               <p><span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span> Error, you don't have an email address linked to your account. </p>
  20.               <p> You cannot request this report</b>. </p>
  21.             </div>

  22.  <% End If ' end Email.EOF And Email.BOF %>

  23. </body>


Any help would be great..... PS. .. i'm doing this in dreamweaver (so noob)...