open a modal just before submit to get an answer yes or no and then submit I'm altering a comment form and on my page i want to show a modal to ask the user for an answer then i will submit.

I tried to drupal_get_form on a ctools modal but a lot of problem on submit it will return to the same submit page and an outher problem with the form_i can not get.

is there any good example or a good idea to do that?
Create a file named as 'search_result.js' and include it into the particular module using drupal_add_js(path/filename.js); and the copy and phaste the following code into search_result.js

 (function($, Drupal, window, document, undefined) {

Drupal.behaviors.searchResults = {
  attach: function(context, settings) {

       $("#elementID").click(function(){
        if(confirm("Are you sure that you want to proceed?")){
            return true;
            }
        else {
            return false;
            }
        });
  }


}
})(jQuery, Drupal, this, this.document);   

Note: "#elementID" is the id of the element on which when you click the confirm window is shown