Hold execution for self made alert box

Hold execution for self made alert box

guys..

I have my made alert box using DIV.
i need to hold the execution till user click the YES or NO in that DIV alert.

is there any way to achieve this..?