Call code snippet from javascript
-
I would like to have JavaScript call a PHP function defined in a snippet but what would be the url for ajax?
$(‘.button’).click(function() {
$.ajax({
type: “POST”,
url: “some.php”,
data: { name: “John” }
}).done(function( msg ) {
alert( “Data Saved: ” + msg );
});
});<?php
function abc($name){
//your code here
}
?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Call code snippet from javascript’ is closed to new replies.