I have several functions in a .js file that collect various types of information from the visitor, let's just say they are strings, and want to send that information to my database. I have no problem putting the information in my database once I get everything into PHP (I'm relatively new to JS).

Am I able to make a form in the .js file and automatically submit it once all the functions finish? I also need the page not to refresh when sending this information so I'm assuming some AJAX will need to be involved. I was able to send a basic form using some jQuery I found and have the page not refresh but can't figure out how to do the same in a .js file.

<script type="text/javascript"> 
        // wait for the DOM to be loaded 
        $(document).ready(function() { 
            // bind 'myForm' and provide a simple callback function 
            $('#myForm').ajaxForm(function() { 
            }); 
        }); 
</script>

Any help would be greatly appreciated as I have been stuck for a while

Nevermind. I was way off. All you do is a simple $.post command with jQuery, documented here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.