Skip to main content

Bug Tracker

Side navigation

#8330 closed bug (duplicate)

Opened February 20, 2011 06:12PM UTC

Closed February 20, 2011 09:43PM UTC

Last modified March 14, 2012 07:41PM UTC

Can not force form to submit

Reported by: garrychilds@hotmail.com Owned by:
Priority: high Milestone: 1.next
Component: event Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

When attempting to submit a form using the code below jQuery core throws an error "target[targetType] is not a function".

$("#accountSettings").submit();

accountSettings is the id of the form to submit, the form also has the same name.

The following is a snippet of the jQuery core code where the error is being reported.

try {
if ( target[ targetType ] ) {
// Make sure that we don't accidentally re-trigger the onFOO events
old = target[ "on" + targetType ];

if ( old ) {
target[ "on" + targetType ] = null;
}

jQuery.event.triggered = true;
target[ targetType ]();
}

// prevent IE from throwing an error for some elements with some event types, see #3533
} catch (triggerError) {}

if ( old ) {
target[ "on" + targetType ] = old;
} 
Attachments (0)
Change History (4)

Changed February 20, 2011 06:22PM UTC by garrychilds@hotmail.com comment:1

I have just discovered that jQuery does not submit the form if the submit button is named submit, perhaps this should be looked into or documented.

Hope this helps

Changed February 20, 2011 09:43PM UTC by rwaldron comment:2

resolution: → duplicate
status: newclosed

Changed February 20, 2011 09:44PM UTC by rwaldron comment:3

Duplicate of #1414.

Changed February 21, 2011 12:12AM UTC by jitter comment:4

component: unfiledevent
priority: undecidedhigh