Skip to content

Suggested enhancement - how identify AJAX submission? #10

Closed
@BilboUK

Description

@BilboUK

To avoid duplicating code, I use the same script to process form submissions whether it is via ajax or not (e.g. if user has JS disabled). It is necessary in this case to separate ajax posts so that only the relevant sub-page can be sent back to the browser. I normally inject a form field prior to the ajax submission to do this. I could pick up the form object in a pre-submission callback but it may be easier to simply mod the plug-in - perhaps a small enhancement: e.g. insert before L473:
a.push({name: 'jqueryForm', value: 'true'});

This will add an input field which I can then detect in the server script and adjust the processing accordingly.
Thx,
Geoff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions