Passing Javascript Variable to PHP using Ajax -
i wanna pass javascript variable in php using ajax... coz wanna pass onclick. i'm getting onclick value variable row. b gratefull :) thank you
<script type="text/javascript"> function updatetable(row) { alert (row); var row = (row); } </script>
did u try this?
$.ajax({ url: 'do.php', type: 'post', data: "userid=" + onlyid, success: onmembersucces, error:onmembererror }); function onmembersucces(data) { alert(data); } function onmembererror() { alert("error!!"); }
where do.php php file , onlyid javascript variable.
is looking for?
Comments
Post a Comment