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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:55:53+00:00 2026-05-26T04:55:53+00:00

I have a form embedded in a web page. When the user clicks submit

  • 0

I have a form embedded in a web page. When the user clicks submit the XHR response is either a form with all fields reset (i.e. upon success), or a form with error messages (i.e. upon failure). I use the response to overwrite the existing form.

This works the first time the user submits the form. If they submit a second time however, the problem is that the form is posting a full HTTP request.

In the web page the form is wrapped in a span, #add-container. The button within the form is #add-button.

Per the code below, I am trying to re-bind a function to the click event of the buttom whenever the content in the span changes. It seems that this works the first time (i.e. when the document loads), but not subsequent times (i.e. when the XHR response is loaded into the page).

// Add product and services
$(document).ready(function() {
    $("#add-container").change(prepareAddForm());
});

function prepareAddForm() {
    var uri = '/product/add/org/4/format/html';

    $("#add-button").click(function() {
        $("#add-container").load(uri, {language: "php", version: 5});
        return false;
    });
}

Any ideas? Thanks for your assistance…

  • 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-26T04:55:53+00:00Added an answer on May 26, 2026 at 4:55 am

    Sorry – just sorted it out. Needed to use the .live() method!

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

Sidebar

Related Questions

I have a web browser control embedded in a form . Upon form load
I have a form with an embedded web browser control on it. I am
I have a parent form PageForm and an embedded form ContentForm. Page has a
If I have a HTML form with some embedded div s, and after the
I have an embedded iframe form which takes a file from a type=file form
If I have an embedded browser in a windows form, is it possible to
Let's say I have an embedded Excel Spreadsheet on a Microsoft Access form. I
I have form with user defined filters ( combobox with column names, combobox with
I have form with one input for email and two submit buttons to subscribe
Im trying to create a custom formatter in Symfony 1.4. I have embedded form

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.