2

In Safari Browser having one issue, following are my scenarios (with Example).

When i Click a button for delete an account on that time i opens alert message. in that alert window having two actions "OK" and "Cancel". if i click Yes it will redirect to another URL.(This is No Problem). But When i click "Cancel", i triggering to open another alert window. on that time previous alert not getting closed.

In Other Browsers like I.E, Firefox, Chrome it working fine.

Below is my Coding....

    $('#upgradeNo').click(function(){ // Function
    $('#accountFrame').hide('fast'); // To close the alert window( First alert)
    $.modal.close(); // To close the alert window( First alert)
    if( $("#deleteconf").val()=="ok"){ // Click Yes Button Function
        deleteAcc();
    }else{ // Click Cancel Button Function
        $("#accountFrame").css('display','none');
    deactivateAccount(); // new Alert gets open in this place
    }
    $("#deleteconf").val('');   
});

Can anybody give me a quick solution. Awaiting for Response.

Thanks

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ELAYARAJA
  • 521
  • 3
  • 10
  • 23
  • i dont know but have you tried using only javascript?(js will work fine in all browsers) document.getElementByid('#accountFrame').style='none'; – ɹɐqʞɐ zoɹǝɟ Feb 13 '14 at 12:55
  • @ferozakbar Yes, i tried it in both Javascript and Jquery. Is it really a issue in Safari ? – ELAYARAJA Feb 13 '14 at 13:00
  • 1
    once see these links,hope it helps http://stackoverflow.com/questions/9813047/id-option-hide-not-working-on-safari-chrome http://stackoverflow.com/questions/16736762/hide-and-show-function-not-working-in-safari http://stackoverflow.com/questions/8373735/jquery-hide-option-doesnt-work-in-ie-and-safari – ɹɐqʞɐ zoɹǝɟ Feb 13 '14 at 13:14
  • 1
    @ferozakbar - +1 - thanks , I Got an Idea through your Link. – ELAYARAJA Feb 13 '14 at 15:16

1 Answers1

1

i Got a Solution. i put the code in Modal Window OnClose Event. after that i called alert box. Now its working Fine , what i Expecting.

                onClose: function (dialog) {
                dialog.container.fadeOut(100, function () {
                dialog.overlay.fadeOut(200, function(){
                    $.modal.close();

                    if (deactivateFlag)
                        {
                    deactivateAccount();
                        }
                });
                });
            }

Thanks

ELAYARAJA
  • 521
  • 3
  • 10
  • 23