Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6542399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:13:22+00:00 2026-05-25T11:13:22+00:00

I am writing a dialog popup to perform some task through it. Popup is

  • 0

I am writing a dialog popup to perform some task through it. Popup is opening up fine for the first time but its not showing up for the second click. Here is the code I am using to open the popup, Can you please let me know whats wrong here?

$(document).ready( function() { 
   $( "#ALERT_POPUP" ).dialog({
      autoOpen: false, 
      height:400, 
      width:900, 
      modal:true,    
      show: 'slide', 
      hide: 'slide',
      close: function(ev, ui) {$(this).remove();}
   });
});

$( "#alertPopup").click(function() { 
   $.ajax({
url: "alertAction.do?reqCode=alertSearch",
   success: function(returnedData){
         $('#ALERT_POPUP').empty().append(returnedData).dialog('open');
         return false;
      } 
   }); 
});

Question: Also i Want to multiple operation on dialog single window. Can some one give me some pointer to submit the dialog form multiple time without going to parent window? Please help!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:13:23+00:00Added an answer on May 25, 2026 at 11:13 am

    In the dialog’s close event $(this).remove() means that you remove the “#ALERT_POPUP” div from the DOM, so the second time you want to open the dialog, it does not exist. There’s no need for the close event I think.

    EDIT

    A working example:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Test</title>
    
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
    
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
    
        <script type="text/javascript">
    
            $(document).ready( function() {
               $( "#ALERT_POPUP" ).dialog({
                  autoOpen: false,
                  height:400,
                  width:900,
                  modal:true,
                  show: 'slide',
                  hide: 'slide'
               });
    
               $("#alertPopup").click(function() {
                    $.ajax({
                        url: "test.html",
                        success: function(returnedData){
                            $('#ALERT_POPUP').empty().append(returnedData).dialog('open');
                            return false;
                        }
                    });
                });
            });
    
        </script>
    
    </head>
    
    <body>
    
        <div id="ALERT_POPUP"></div>
    
        <button id="alertPopup">Click!</button>
    
    </body>
    
    </html>
    

    Note that the close event is removed and the “#alertPopup” click init is inside the $(document).ready function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a plugin (dll file), and I'm creating a WinForm as its interface/dialog.
I'm writing a popup widget that inherits from ui.dialog and I'm wondering if there
We're writing Windows desktop apps using C++ and Win32. Our dialog boxes have an
Writing documentation in html requires some code examples. What to do with characters that
I am writing a watir script to test an upload form. But the script
To pop up the UAC dialog in Vista when writing to the HKLM registry
I'm writing a .ogg and .flac to .mp3 converter in dialog (ncurses) and I
I'm writing a set of C# composite web server controls for displaying dialog boxes.
I'm writing my first Android application and I have one activity that I'd like
My Flex 3 application has some modal dialogs displayed via the PopUpManager, but there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.