Relative Content

Tag Archive for javascriptphpajax

Passing a js variable to php

Im trying to send a js variable value to php using ajax. So when the page loads, it will do the job, at the same url. Im trying this but nothing seams to work:

javascript and php handling when form submits

Im new to web development, im trying to create a to do list. How to include this javascript function when form submits. I tried doing onClick(addTask(event)) it ignores javascript,page reloads and insert task on my mysql database, how do I make php and javascript work simultaneously? How to integrate JavaScript function with form submission?