title: Customizing JavaScript confirmation dialog boxes?
body: <pre><code>$('#confirm_event').click(function(e){
      var x = $('#function_name').val();
      return confirm('Are you sure you want to submit: ')
  })
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EyiDo.png" alt="enter image description here"></p>
  
  <p>While this generates the above, I'd like to replace "title bar text" and include var x value in the return confirm message. I tried several ways but returns undefined value or doesn't work at all. How do I customize the dialog box?</p>