Couldnt really find any working solution to this problem.
I have an alert in a a php page, that page is being loaded by AJAX. The alert doesnt work. Why?
<!DOCTYPE html>
<html>
<head>
<script>
alert('test');
</script>
</head>
<body>
<?php
$from = $_REQUEST['from'];
$to = $_REQUEST['to'];
$amount_per_day = 100;
$hoursDiff = ( strtotime($to) - strtotime($from) )/(60 * 60) / 24;
$final_amount = $amount_per_day * ($hoursDiff + 1);
if($final_amount < 1900 && $final_amount > 0) {
echo $final_amount . ".00 GBP";
}
else if($final_amount < 0) {
echo "Days cannot overlap";
}
else {
echo '0.00 GBP';
}
?>
</body>
</html>