heres my form, don’t know if I’ve set it up correctly for use with AJAX however…
<form id="form" method="post">
<input id="cloudName" name="cloudName" type="text" placeholder="Enter cloud name">
<input id="cloudFamily" name="cloudFamily" type="text" placeholder="Enter cloud family">
<button id="add" type="submit" name="add">Add</button>
</form>
I basically am wondering how to create a div with the class=”cloud” and put the first input item “cloudName” in the first p tag in the div, and “cloudFamily” in the second p tag in the div that we create when we press the add button…hopefully there is a script that will allow us to continually add divs as well. Any help appreciated. I’ve searched online for adding divs with AJAX but nothing is working, maybe because I am making other ajax calls elsewhere on the page? Dont know if that would effect it or not
Here’s an example that should work for you assuming you are able to get jQuery working. Note, this assumes you have a container (to place the new div) named cloudcontainer:
Javascript would look like this:
The resulting HTML would look like this:
I’ve prepared a working JSFIDDLE example at this link: Example