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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:16:02+00:00 2026-05-16T14:16:02+00:00

I have a page that creates multiple forms for each object that I had

  • 0

I have a page that creates multiple forms for each object that I had selected on the previous page, and each of these forms has the id “edit_movie_[uid]”. I’m trying to get jQuery to act on submit but right now all it does is make my submit buttons nonresponsive. In my application.js I have:

jQuery.ajaxSetup({
   'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
 })

 $(document).ready(function(){

   $('form[id^="edit_mov"]').submit(function(){
      $.post($(this).attr('action'), $(this).serialize(), null, 'script');
      return false;
   })
 })

As the callback for my submit button I just have:

alert("jquery works");

So an alert box should pop up, but right now none of the buttons do anything and some of them are unclickable.

  • 1 1 Answer
  • 2 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-16T14:16:02+00:00Added an answer on May 16, 2026 at 2:16 pm

    Looks like you’re triggering the event in your ready block rather than binding it. You can use bind, or, better yet, delegate. Also, avoid calling $() more than once:

    $(function() { // Shorthand for $(document).ready()
      //$('form[id^="edit_mov"]').bind('submit', function() {
      $(document).delegate('form[id^="edit_mov"]', 'submit', function() {
        var form = $(this);
        console.log('submit triggered', form);
        $.post(form.attr('action'), form.serialize(), null, 'script');
        return false;
      })
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which dynamically creates multiple forms, each form had a unique
I have a page that displays multiple Formsets, each of which has a prefix.
I have a page that creates an associative array, then passes it as a
I have a page that dynamically creates (using jQuery) Input boxes for the user.
I have a .Net application that dynamically creates a small HTML page and pops
I have a query that is more complicated, but basically creates an HTML page
Today we have a windows application that, using an OCX, creates a web page
I have created a web page that has two bars across the top of
In MVC3 Razor, how do you create a page with multiple forms, so that
So I have a page, it had multiple textboxes, linkbuttons, and buttons. Currently, a

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.