Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Forms Don't Recognize rel="external" or target Attributes #952

Closed
bdoms opened this Issue · 4 comments

4 participants

@bdoms

Since anchor tags can be forced to reload the entire page instead of using AJAX by adding rel="external" or a target, it follows that form tags should have the same behavior.

At the very least, there should be some way of indicating that a form should not use AJAX.

@integer

This behaviour is really annoying.

Is available some workaround for the present?

@bdoms

As I mentioned in a different, but related bug (https://github.com/jquery/jquery-mobile/issues#issue/570), if the form uses GET there is a workaround by just forcing the window's URL to be what you want on submit:

$("#formid").submit(function() {
    window.location = this.action + "?" + $(this).serialize();
}

However, I'm not sure if you can workaround this for forms that use POST.

@toddparker

THanks, I just bumped this up to critical.

@scottjehl

Added support for the target attribute on forms (such as target="_blank"). When set, the form handler simply allows the native handling to apply. Unlike anchors however, the rel attribute is not allowed on forms. If you're purely looking to submit a single form without ajax, you can use the data-ajax="false" attribute as well. Closed by 6100594 and docs updates are included

@scottjehl scottjehl closed this
@brandonwoo brandonwoo referenced this issue from a commit
scottjehl Added support for the target attribute on forms (such as target="_bla…
…nk"). When set, the form handler simply allows the native handling to apply. Unlike anchors however, the rel attribute is not allowed on forms. If you're purely looking to submit a single form without ajax, you can use the data-ajax="false" attribute as well. Fixes #952 and docs updates are included
6100594
@timmywil timmywil referenced this issue from a commit
scottjehl Added support for the target attribute on forms (such as target="_bla…
…nk"). When set, the form handler simply allows the native handling to apply. Unlike anchors however, the rel attribute is not allowed on forms. If you're purely looking to submit a single form without ajax, you can use the data-ajax="false" attribute as well. Fixes #952 and docs updates are included
3d867b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.