html - Storing Large Form Data JavaScript -
i learning javascript make large form stays local( no web server involved what-so-ever ). familiar php, javascript new me. have form has 100+ checkboxes , text fields. of fields show "[x] other: [/text field/]" when select "other" selection, have enter input. making validation make sure you, a: enter text if selected "other." b: make sure selected check box if have entered text. when validation function finds wrong, shows alert box. then, page reloads( not sure why ) , of data put form wiped. so, need find way store form data load upon page reload. started cookies, came upon me there limits number of cookies , sizes. else can do??? please help!
your submit
button reloading page.
for example, if form set this:
<form name="main" method="post"> <!-- lots of input fields --> <button type="submit" id="subbutton">submit!</button> </form>
this doing post
undefined server because form
has no action
if you're sure don't need server interaction @ all, it's not necessary use form
element
this means can remove form
, submit
elements page , use button
element instead
<!-- lots of input fields --> <button id="clientaction" type="button">click me</button>
from mdn:
the html element represents document section contains interactive controls submit information web server.
Comments
Post a Comment