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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:45:38+00:00 2026-06-06T04:45:38+00:00

When I drag an item to a list the following jQuery is executed except

  • 0

When I drag an item to a list the following jQuery is executed except for the submit.

jQuery:

...
$( "#group ul" ).droppable({
    activeClass: "ui-state-default",
    hoverClass: "ui-state-hover",
    accept: ":not(.ui-sortable-helper)",
    drop: function( event, ui ) {
        // ****** THIS WORKS
        $( "<li></li>" ).text( ui.draggable.text() ).appendTo( this );
        // ****** THIS IS NOT EXECUTING
        $(this).parents('form: first').submit();
        return false;
    }
...

There is a form for each group. The first form id is 0, the second form id is 1, and so forth (source view):

<div id="team">
   <form accept-charset="UTF-8" action="/items/create_from_drop" data-remote="true" html="{:id=&gt;0}" method="post">
      ...
      <input id="group_id" name="group_id" type="hidden" value="3" />
      <ul>
          ... item list
      </ul>
   </form>

   <form accept-charset="UTF-8" action="/items/create_from_drop" data-remote="true" html="{:id=&gt;1}" method="post">
      ...
      <input id="group_id" name="group_id" type="hidden" value="5" />
      <ul>
          ... item list
      </ul>
   </form>
</div>

There are two problems:

  1. First, when the drop occurs i was hoping that i could trigger submission of the form with the same event. That isn’t happening.
  2. I have submit ‘form:first’. How do i change the selector to submit the form based on id?

Thanks for your help.

  • 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-06T04:45:39+00:00Added an answer on June 6, 2026 at 4:45 am

    Try to use the closest() instead of parents, this should get you only one element. Besides that, check if you have any onSubmit event on the forms, and if the problem is not with this handlers.

    just realized something….

    at $( “#group ul” ).droppable…

    where’s the element with the id group?

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

Sidebar

Related Questions

I'm trying to implement drag/drop/sort between 2 list elements: <ul id=first> <li>item 1</li> <li>item
I want to drag item from one list to another list with clone. After
JSFiddle Source If you drag and drop an item from source list box to
I'm building a drag-and-drop list via jQuery UI where users can drag a list
I have the following empty list: <ul class=sortable_list> <p><a>Add new item</a></p> </ul> <ul class=sortable_list>
We're trying to figure out how to drag an item from a LibraryStack container
I've got a WinForm where the user has the ability to drag an item
Drag is not working after dropping on the area. I have used Jquery UI
I'm bulding some drag and drop widgets in jQuery, once they've been dropped I
I am trying to make a drag drop stage using Jquery, I am having

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.