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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:40:41+00:00 2026-05-31T16:40:41+00:00

In my first Node project Express / Express-resource libraries are used and Jade for

  • 0

In my first Node project Express/Express-resource libraries are used and Jade for templating.

According to docs default mappings are generated. Among them we can find:

PUT     /forums/:forum       ->  update

Yet, I do not see easy way to submit values.

How to submit creation/update?

Jade form can be created easily and body parser as well, but how to submit this form? Please note that express-resource defines PUT method (not POST).

  • 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-31T16:40:42+00:00Added an answer on May 31, 2026 at 4:40 pm

    From the Express guide:

    When using methods such as PUT with a form, we can utilize a hidden input named _method, which can be used to alter the HTTP method. To do so we first need the methodOverride middleware, which should be placed below bodyParser so that it can utilize it’s req.body containing the form values.

    So:

    app.use(express.bodyParser());
    app.use(express.methodOverride());
    

    And in your form:

    <input type="hidden" name="_method" value="put">
    

    Update: As I understand the new comments from the asker, nrph wants a way to submit a form with the PUT method, using ajax. Here is a solution using jQuery:

    // Use this submit handler for all forms in document
    $(document).on('submit', 'form', function(e) {
      // Form being submitted
      var form = e.currentTarget;
      // Issue an ajax request
      $.ajax({
        url: form.action,          // the forms 'action' attribute
        type: 'PUT',               // use 'PUT' (not supported in all browsers)
                                   // Alt. the 'method' attribute (form.method)
        data: $(form).serialize(), // Serialize the form's fields and values
        success: function() {},
        error: function() {}
      });
      // Prevent the browser from submitting the form
      e.preventDefault();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing my first project in node/express. I'm looking to implement a data store
I have just gotten a VPS to bring my first node.js project online, but
I create a linked list dynamically and initialize the first node in main(), and
I am taking my first steps with Node.js and I was wondering whether there
First day at programming in Node today. I've been getting along nicely all day
I need to copy a node and its sub-nodes: first: one identical copy followed
I'm messing around with Node.js for the first time and decided to create a
This is my first project with Core Data, I followed the Event tutorial provided
I am working on a node project where I want to write some memory
I'm working on my first ever ASP.Net project, and I seem to have been

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.