Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged form



« Prev 1 2 3
Allows for forname.o'[email protected]
0 771 posted 8 years ago by flatearthcomms
Permet de préremplir des champs avec le premier et le dernier jour du mois courant au format jj/mm/aaaa
0 941 posted 9 years ago by Igeco
A set of common From scripting tasks
1 755 posted 11 years ago by chetkloss
Removes $ from HTML form post, allows only number and decimal points. Has $ display in field but disappear when onfocus.
1 728 posted 11 years ago by lromak
JavaScript is the only option, if you want to have the ability to clear all form fields. Yes, HTML form has Reset method, but if the form has initial values, then Reset will return the form to the initial state instead of clear input fields. This exa...
1 744 posted 11 years ago by laxman2021
Allows you to click a given checkbox X, then shift click another checkbox Y. All checkboxes between X and Y will be checked or unchecked based on the state of checkbox Y. i.e. if you're unchecking Y all boxes between X and Y will also be unchecked.
1 1068 posted 11 years ago by ReedD19
Simply changes the name attribute on input elements when the page is loaded.
0 612 posted 11 years ago by stevielamb83
This send any value via POST to a PHP page. It is done with AJAX, so the POST return can be used on the same page as the submit
0 926 posted 11 years ago by rickygri
This javascript function takes the URL of the target page and an associative array of name/values paires and POSTs the data to the supplied URL by dynamically creating a form and then submitting it.
0 2491 posted 11 years ago by rickygri
cross-browser way to select all text in a form element, via Jason on Stack Overflow
0 585 posted 11 years ago by charliefmoran
Simular submit al hacer enter y tener un boton type="button"
0 590 posted 12 years ago by rickyslow
Usually when working with form you use a server to handle it, and if your doing it entirely in javascript no reload is required, but what if you wanted to take the information and use it in a javascript on another page, completely client side. I had...
0 917 posted 12 years ago by FatFolderDesigner
Use this to convert JavaScript numbers to official scientific standard form (e.g. 1.54 × 10^3) Uses HTML <sup> tags and × symbol Example: var number = 4.223e20; var stnd = standardForm(number); // stnd = 4.223 x 10^20
0 623 posted 12 years ago by Jellybean732
Reset input type text onfocus if value differs from default.
0 530 posted 12 years ago by smonteru
0 666 posted 12 years ago by cfergus
<p>usage: <br> <code>&lt;a href="" onclick="recordOutboundLink(link, category, action, opt_label, opt_value);return false;"&gt; <br> &lt;form id="uniqueID" onsubmit="trackFormSubmit(form, category, action, opt_label, opt_value);return false;"&gt;</...
0 992 posted 12 years ago by freezy
Don't forget to include jQuery validation plugin before this snippet. You can find it here: http://bassistance.de/jquery-plugins/jquery-plugin-validation/
0 1027 posted 13 years ago by racl101
Often you supply a default value in a text field which you want to automatically clear when the user enters the field. This will do that operation and fill the field with a default value.
0 671 posted 13 years ago by jimbo
Clear a field on entry if the default text matches a supplied value. Generic to any field.
0 559 posted 13 years ago by jimbo
Giorgio fecit. Serve per controllare, a partire da un checkbox, che non ne siano selezionati altri nella stessa riga.
0 547 posted 13 years ago by tuffo19
Code matches querysting data to form feilds on the page based on the feild name. I've added the example querystring to the body of the page. Found at: http://codingforums.com/showthread.php?t=198419 Code by: Old Pedant
0 585 posted 13 years ago by Carolyne
We set up a voting page, where supporters would choose one of three candidates (only two are shown in the snippet). By clicking the checkbox, the supporter would add themselves to a Salsa group. This way only one vote for a candidate by a supporter w...
0 551 posted 13 years ago by powerthru
this is a way to deal with the fact that we can\'t reliably make checkboxes look larger on forms. So instead, we surround the form with a colored div, and set it up so that when the user clicks on the label next to the checkbox it checks the box.
0 652 posted 13 years ago by powerthru
In regards to progressive enhancement, see also the [jQuery version](http://snipplr.com/view/48275/default-value-for-input-fields-jquery-version/).
6 749 posted 13 years ago by riddla
I\'m constantly testing forms over and over for one reason or another, and am fed up with making a typo and autocomplete not populating all the data, so I made this little snippet. It searches for form elements on the page (input, textarea and select...
1 727 posted 13 years ago by dom111
0 545 posted 13 years ago by Farhan
« Prev 1 2 3