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 3212564
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:51:04+00:00 2026-05-17T14:51:04+00:00

I am having no luck in getting a jqueryui dialog to ajax load a

  • 0

I am having no luck in getting a jqueryui dialog to ajax load a form, which inturn submits via ajax.

Everything works upto the point of catching the form that is being submited and instead sending it through an ajax call. Thus the form action is triggered and the browser redirected. The ajax call is never made.

My code is as follows

$(document).ready(function() {
$('.viewOrder').click(function() {
    $('#displayOrder').load(this.href, [], function() {
        console.log("landed here");

            $('#blah').click(function() {
                console.log("submiting the form via ajax");

                $.ajax({
                    url: "/ajax/orderupdate",
                    type: "GET",
                    data: data,
                    cache: false,

                    //success
                    success: function (data) {
                        console.log("worked:");
                    }
                });
                return false;
            });
    });
    return false;
});

});

.viewOrder is the a href that is ajax loaded. This works fine.
I have read many similar questions on here and it seems load() does not execute scripts that are embeded in the return html, but my return code is pure html no scripts. Any ideas?

  • 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-17T14:51:04+00:00Added an answer on May 17, 2026 at 2:51 pm

    The events are bound on page load. At page load the form you are binding the click event does not exist. I use the livequery plugin but they added Live to jquery 4 which you can also use(i had some issues with IE so i went back to livequery)

    So load livequery with your scripts http://docs.jquery.com/Plugins/livequery

    and change

    $(‘#orderUpdate’).submit(function() {

    to

    $(“#orderUpdate”).livequery(“submit”, function() {

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

Sidebar

Related Questions

I have not having any luck getting my .htaccess with mod_rewrite working. Basically all
I am sure this is a simple question, but I am having no luck
I'm new to structure map and so far having good luck. However, there's one
I am not having much luck detecting when a database query in Codeigniter returns
Trying this answer and not having any luck: I am using the SQLite Database
I know this isn't hard, but I'm not having any luck. I want to
I am having very little luck configuring my spring config file for Hibernate Annotations.
Having trouble getting the javascript alert to display from my code behind. c# -
I'm having no luck at trying to add a bit of height to a
I am having some issues with setting values using MacRuby and Cocoa. I have

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.