How to setup redirect actions using javascript confirm button?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sathiyaraj
    • Dec 2010
    • 1

    #1

    How to setup redirect actions using javascript confirm button?

    <HTML>
    <SCRIPT language=JavaSc ript>

    function MsgOkCancel()
    {
    var str;
    str = confirm('You can select O.K/Cancel?');
    if(str!=0){
    // here your actions which are fired by click O.K Button
    }
    else{
    // here your actions which are fired by click Cancel Button
    }
    }

    </SCRIPT>
    <BODY>
    <a href=javascript :MsgOkCancel(); >test</a>
    </BODY>
    </HTML>
Working...