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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:10:48+00:00 2026-06-08T08:10:48+00:00

I am trying to submit various forms on the same page via jQuery/AJAX, it

  • 0

I am trying to submit various forms on the same page via jQuery/AJAX, it is for an admin site where you edit users so the url/action for the form gets generated dynamically. e.g

/user/limit/update?userId=7

or

/user/address/update?id=2.

is there a way find the forms url/action, store it in a variable and pass it the the url in the ajax function?

hopefully the example will make it more obvious.

the generated form tag is

<form action="/user/update?id=3" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlen" id="idfff">

and updated ajax from the suggestion is

$("#user-submit").click(function() { 
    $.ajax({  
        type: "post",  
        url: $('#idfff').attr('action'),
        data:$('#user-update').serialize(),
        success: function() {
            $("<div class='update-success'>Details updated</div>").insertAfter("#user-submit");
          }
    });
    return false; 
});

Hopefully I have explained my problem correctly but please let me know if you require further info.

Thanks

  • 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-06-08T08:10:49+00:00Added an answer on June 8, 2026 at 8:10 am

    Use attr() function on the form element to get action attribute value. In your example it should be something like this: url: $('#limits').attr('action')

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

Sidebar

Related Questions

i am trying to submit 2 forms at the same time im trying to
i'm trying to submit my Ajax form using jQuery. However calling the submit() function
Hello I am a newbie working with jQuery and Ajax. I am trying submit
I'm trying to submit a form with AJAX through jQuery: $('.submit input').click(function() {return false;});
I'm trying to submit a form with a file field in it via jQuery.Form
I'm trying to submit a form (it's a dynamic form with fields added via
I am trying to submit two forms at once (one goes to db and
I'm trying to submit a form when a select changes using jQuery Mobile. I
I'm trying to submit a few forms through a Python script, I'm using the
I am trying to submit a form with method GET and action index.php?id=3. The

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.