I want to write something that acts just like confirm() in javascript, but I want to write it myself so I can skin the dialog box. In having trouble thinking through how I would basically force the javascript thread to wait until the user responds and then return true or false.
Share
If I were you, I would look at one of the popular javascript libraries. Most contain some sort of modal dialog.
A couple I found for JQuery are jqModal and SimpleModal.
When you build the modal dialog, you will have to tie events to the buttons, so you would do something like: