Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Safari : Alert Message Not Closed when next alert Message Opens Using Jquery?

Posted on 2014-02-13
4
Medium Priority
?
851 Views
Last Modified: 2014-02-17
0 down vote favorite
      

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('');   

});

Open in new window


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

Thanks
0
Comment
Question by:ZoniacUser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 1000 total points
ID: 39858003
We can't really see what going on without see the html page that this code is attached to.

Couple of things of note:

$.modal.close(); is not standard jQuery. Why is it there?

You call $('#accountFrame').hide('fast'); when you first click the button ,so why are you then calling $("#accountFrame").css('display','none'); in Cancel - the accountFrame element will already be hidden
0
 

Author Comment

by:ZoniacUser
ID: 39864554
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();
                        }
                });
                });
            }

Open in new window


Thanks
0
 

Author Comment

by:ZoniacUser
ID: 39864559
I've requested that this question be closed as follows:

Accepted answer: 0 points for ZoniacUser's comment #a39864554

for the following reason:

I Got a solution from google with my scenarios. First i closed my modal window and then called alert box. thats it.
0
 

Author Closing Comment

by:ZoniacUser
ID: 39864560
@Chris Stanyon Thanks for Your Comment. Yes Modal.close is the valid syntax for Closing modal window. i have search and found the solution with myself did some workout. i have added the solution above.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question