Question PHP and coldfusion
hi guys,
quick question,
if i call a php file from ajax within javascript in coldfusion will it work without installing anything?
if yes, how come the below is giving me "method not allowed"
test.cfm
<!doctype html>
<html>
<head>
</head>
<body>
<h1>Take screenshot of webpage with html2canvas</h1>
<input type='button' id='but_screenshot' value='save screenshot' onclick='exportAndSaveCanvas();'><br/>
<script type="text/javascript" src="SCRIPTS/jquery-2.1.0.min.js"></script>
<!-- Script -->
<script type='text/javascript'>
function exportAndSaveCanvas() {
try
{
// AJAX request
$.ajax({
type: 'POST',
url: 'export.php',
success: function(data){
alert('Upload successfully');
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert("Status: " + textStatus+ "\nError: " + errorThrown);
}
}); //ajax
}
catch(err)
{
alert(err.message);
return 'err';
}
} // End exportAndSaveCanvas()
</script>
</body>
</html>
export.php
<?php
$message = "in php";
echo "<script type='text/javascript'>alert('$message');</script>";
?>
