I created a form and serialized its content to JSON. I'm kinda new to json. What i want to do is send the json to a url via POST but i dont know how to go about this. Here's my code
<h1>Register</h1> <form class = "myform" method="get"> Name:<br /> <input type="text" name="name" value="" /> <br /><br /> Phone Number:<br /> <input type="text" name="telephone" value="" /> <br /><br /> Location:<br /> <input type = "text" name = "location" value="" /> <br /><br /> Logo:<br /> <input type = "text" name = "logo" value="" /> <br /><br /> Website:<br /> <input type = "text" name = "website" value="" /> <br /><br /> Email:<br /> <input type = "text" name = "email" value="" /> <br /><br /> Category:<br /> <input type = "text" name = "category" value="" /> <br /><br /> Postal:<br /> <input type = "text" name = "postal" value="" /> <br /><br /> Description:<br /> <input type = "text" name = "description" value="" /> <br /><br /> GPS:<br /> <input type = "text" name = "gps" value="" /> <br /><br /> Tags:<br /> <input type = "text" name = "tags" value="" /> <br /><br /> Advert:<br /> <input type = "text" name = "advert" value="" /> <br /><br /> Facebook:<br /> <input type = "text" name = "facebook" value="" /> <br /><br /> Twitter:<br /> <input type = "text" name = "twitter" value="" /> <br /><br /> Google:<br /> <input type = "text" name = "google" value="" /> <br /><br /> <input type="submit" value="Submit" /> </form> <script src="jquery-1.11.1.min.js"></script> <script> var frm = $(document.myform); var data = JSON.stringify(frm.serializeArray()); console.log(data); </script> So how am I supposed to go about POSTing it to the url? (assuming the url is www.me.com)
$.post()?