Skip to content

Commit 6cb1db5

Browse files
committed
Added some notes to the 3 lines of JS example
1 parent b6cc809 commit 6cb1db5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,11 @@ remote_form.getForm();
348348
```
349349
350350
<h4 id="3lineofjs">How to get and submit a form in 3 lines of javascript:</h4>
351+
<i>
352+
- Success/failure messages will be shown in an alert
353+
- HTML5/browser validation is done on the required field prior to submit</i>
351354
352-
Your javascript (success/failure messages will be shown in an alert)
355+
Your javascript
353356
```javascript
354357
new FormFromURL('/email-form', {
355358
insertIntoElement: 'body.form-container',
@@ -359,7 +362,7 @@ Your HTML
359362
```html
360363
<div class="form-container"></div>
361364
```
362-
Server response when retrieving /email-form
365+
Server response when retrieving /email-form (or, just the HTML without the JSON wrapper)
363366
```json
364367
{
365368
"html": "<form><input name='email' required='required'><input type='submit' value='Submit'></form>"

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@htmlguyllc/jpack",
3-
"version": "4.0.13",
3+
"version": "4.0.14",
44
"description": "Core Javascript Library of Everyday Objects, Events, and Utilities",
55
"keywords": [
66
"javascript",

0 commit comments

Comments
 (0)