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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:29:51+00:00 2026-05-16T17:29:51+00:00

I have a drupal form which i post using jquery when you select an

  • 0

I have a drupal form which i post using jquery when you select an option from a selectlist (a sort of quicksearch selectlist).

The porblem is that when i submit by clicking the button, it works.
When I use jquery, and the button is in the form (hidden or not), it works.
When I use jquery and I rmove the button, the post is done, but the “FORM_submit” function is not called and it just refreshes my page.

Can anyone explain this behaviour ?

@edit:

The strange thing is, I was thinking: because you have multiple buttons maybe you have to post the button as a parameter as well. But when I scan trough the posts, the button is not included:

Parametersapplication/x-www-form-urlencoded
form_build_id   form-138a553d76a89c82e09a231a2f55e8a9
form_id duration_search_form
keyword 103
Source
Content-Type: application/x-www-form-urlencoded Content-Length: 92 keyword=103&form_build_id=form-138a553d76a89c82e09a231a2f55e8a9&form_id=duration_search_form

Altough, this is with a jquery submit function, and a hidden button, and it works

  • 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-16T17:29:52+00:00Added an answer on May 16, 2026 at 5:29 pm

    This is because you have to post the value of the submit button also. Here comes an example how I did it in bubbletimer-6.x-2.x:

    var formdata = $('#myform').serialize();
    formdata += '&op=' + escape($('input[type=submit]', $('#myform')).val());
    $.ajax({
      type: 'post',
      url: $('myform').attr('action'),
      data: formdata
    });
    

    Full file: http://drupalcode.org/viewvc/drupal/contributions/modules/bubbletimer/bubbletimer_ahah.js?view=markup&pathrev=DRUPAL-6–2

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

Sidebar

Related Questions

I'm using Drupal . I have a module which loads a form onto a
I'm using drupal. I have a form which has a single field, the field
I have a form made using Webform[Drupal] which I load on the lightbox. The
i have form in drupal which uploads images and has got few checkboxes in
I have a Drupal form array that uses a prefix of '#' to indicate
I have Drupal 6 website which is using FCK Editor as HTML editor. It
I have a form field in Drupal which I need some help with. The
I have a Drupal 7 form which I'm allowing the user to submit via
I've got a hidden field inside a form, which I create using Drupal's form
Im using drupal. I have a field which displays a countdown timer. im trying

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.