web form to json

ITsolutionWizard
ITsolutionWizard used Ask the Experts™
on
If I have just a simple web form in html and  a submit button., and I want to create json file basically,
when the button is clicked, capture, each id inside of the form in a loop. (My web form will be huge so I do not want to capture one by one).
then create json format, and  drop into root directory like www.hello.com\json\abc.json.

Is it possible?

In my web form I only use type=text and <select></select> and the id name will be header name  inside of json. Just keep it simple. and I do not use <form></form> just <a onclick=submitnow()>

Thanks,

<div class="col-md-6">
    <div class="form-group bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Number: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccnumber" value="Market St., San Francisco" placeholder="Enter Card No.">
    </div>
</div><!-- col-8 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Expiration Month: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccexpdatemm" value="" placeholder="Enter Card Expiration Date Month">
    </div>
</div><!-- col-4 -->
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card Expiration Year: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="ccexpdateyyyy" value="" placeholder="Enter Card Expiration Date Year">
    </div>
</div>
<div class="col-md-2">
    <div class="form-group mg-md-l--1 bd-t-0-force">
        <label class="form-control-label"><i class="fa fa-credit-card"></i> Card CVC: <span class="tx-danger">*</span></label>
        <input class="form-control" type="text" name="cccvc" value="" placeholder="Enter Card CVC">
    </div>
</div>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
You can use : https://api.jquery.com/serializeArray/
$("form:eq(0)").serializeArray(); // first form found in the page
$("#YourFormID").serializeArray(); // form with "YourFormID"

Author

Commented:
i do not get it. sorry

Author

Commented:
and how to drop the json file to the root directory?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial