Hey everyone, this code below is giving me a weird error, Script 438: Object doesn't support property or method 'ajax'. I am testing this in Microsoft Edge, but...I have a website that uses this exact same code, and its working like normal. I am getting the var id
to load properly, I am not sure why it is not working, since, its working on the other site. I copied and pasted the code to match exact. anywho, its stating that it at the $.ajax({
line.
<script>
$(function(){
$('.get-msg').click(function(){
var id = $(this).attr('data-id');
$.ajax({
type : 'GET',
url : 'viewmessage.php',
data : 'dataID='+ id,
success : function(r){
$('#messageModal').modal('show');
$('#messageBody').show().html(r);
}
});
});
});
</script>
if(isset($_GET['dataID']) && is_numeric($_GET['dataID'])){
$id = mysqli_real_escape_string($link, $_GET['dataID'] );
$query = "SELECT * FROM `jobs` WHERE `id`='$id' LIMIT 1";
$result = mysqli_query($link, $query);
$message = "";
if($result){
$row = mysqli_fetch_assoc($result);
$message .= '<div><h4>Title: </h4><h5>'.$row['title'].'<h5></div>';
$message .= '<hr><br>';
$message .= '<div><b>Job Description:<br>'.$row['description'].'</b></div>';
$message .= '<hr><br>';
$message .= '<div><b>Rate:<br>'.$row['rate'].'</b></div>';
echo $message;
}else{
echo "No such data";
}
}