Continue improving `ajax-and-forms`

Aperta
#63 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, jquery
Ambito
documentation

Direzione di ricerca

Inizia con l’articolo ajax-and-forms, poi esamina la discussione in #38 e lo spostamento di prefilters richiesto in #62. Confronta il Form Plugin menzionato, l’esempio di serialize-to-object, le risorse sulla validazione e l’esempio di deferreds prima di pianificare le modifiche all’articolo. Il lavoro è completato quando gli argomenti richiesti su form e validazione sono trattati, il tono è mirato e la sezione prefilters è stata spostata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Chapter: ajax content

@connormontgomery's improvements have been really useful, but this can probably use even more fleshing out. This could include some of the following improvements:

  • "Ajaxifying" existing forms
  • Form Plugin - to follow up the discussion in #38, I actually think it's worthwhile to show how the plugin can be useful in doing the above ("ajaxification") and how doing so provides a considerably more familiar flow to form authoring than just serializing data and shoving it off to a url you type into your JS: (eg. $.post("form_process.php", $form.serialize())
  • Serialzing a form to an object (https://raw.github.com/cowboy/jquery-misc/master/jquery.ba-serializeobject.js, explain why this is left out of core (http://bugs.jquery.com/ticket/11002))
  • Augmenting a form's data during a submit handler (for both traditional and AJAX submissions)
  • Client side validation (all these changes might merit moving "validation" into its own article)
    • discuss how to leverage native techniques before just defaulting to using JS.
    • using a validation framework (jQuery Validation or a hand-rolled one) (in order to keep yourself from having the same phoneNumberRegex or whatever similar actual validation logic dupliated throughout your app)
    • use of native validation APIs ?
    • collecting and displaying client side errors (good vs. bad UX)
    • Using deferreds to incorporate AJAX-validation of form data on the client side with client-side only checks

Stylistically, we should also move away from overly effusive phraseology ("extremely easy") and do our best to keep the tone focused on how it works, not how you'll feel as a user.

In addition, we should move the section on prefilters as per #62.

Lingua principale
JavaScript
Stelle
914
Fork
472
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jquery/learn.jquery.com

Tutte le issue di jquery/learn.jquery.com

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.