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

  • Home
  • SEARCH
  • 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 5977699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:24:30+00:00 2026-05-22T21:24:30+00:00

<script> $(function() { $(‘#clickMe’).click(function(event) { var mytext = $(‘#myText’).val(); $(‘<div id=dialog></div>’).appendTo(‘body’); event.preventDefault(); $(#dialog).dialog({ width:

  • 0
<script>
$(function() {

$('#clickMe').click(function(event) {
var mytext = $('#myText').val();


$('<div id="dialog"></div>').appendTo('body');            
    event.preventDefault();


            $("#dialog").dialog({                                   
                    width: 600,
                    height:300,
                    modal: true,
                    close: function(event, ui) {
                            $("#dialog").remove();
                            }
                    });
}); //close click
});

How can I implement an ajax call inside the modal dialog?

  • 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-22T21:24:30+00:00Added an answer on May 22, 2026 at 9:24 pm

    The modal dialog is nothing but a DIV/HTML element on your page .

    Its hidden by default and when the user click on a button the modal is called and it shows up on top of the page .

    You can add ajax to it the normal way

    For Example

    <div id="dialog">
       <a id="click" href="#">click me</a>
       <span id="after_ajax"></span>
    </div>
    

    —

    $('#click').live('click', function(){
     $.post('',function(data){
       $('#after_ajax').html(data);
     });
    
    });
    

    Note I am binding the #click to a live event because I can see that you are adding the #dialog dynamically via jQuery .

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

Sidebar

Related Questions

Have next script: function clicker(){ var linkId = [id*= + link]; var butnId='initial'; $j(linkId).click(function(){
Found this script: function stopRKey(evt) { var evt = (evt) ? evt : ((event)
What's wrong with my jquery script? Here's the script function debug(message){ $(body).append(<div id=\debug\>+ $(message)
I got an if-else script: $('#favitem').live('click', function () { var fid = $(this).parent().attr('id'); if
The JS script: function ShowUploadingAnimation() { $('#info_msg').html(<div style=\padding-top: 15px; height: 50px;\ align=\center\><img id=\uploading-img\ /></div>);
I have a java script function that i have called on body load mousemove()
to custom validate an input i wrote a script: function cardNumberCheck(value, element) { var
Hay, i'm using this script function preloader(images){ var i = 0; imageObj = new
I have the following dummy test script: function test() { var x = 0.1
How do I call a client script function from a server side button click(with

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.