I got a simple php page that executes a Jquery script as follows:
SCRIPT part:
<script>
$(document).ready(function(){
$(".ajax_link").mouseover(function(){
sfpRx($(this).text());
});
}
function sfpRx(sfp){
console.log("sfpRx Was executed");
$.ajax({
type: "GET",
url: "/NOKIA/sfp-load.php?sfp="+sfp,
async: true,
dataType: "text",
timeout: 5,
success: function(data){
console.log(data);
}
});
}
</script>
HTML part:
<td class="ajax_link">3FE62600AA</td>
sfp-load.php content:
<?php echo $_GET['sfp'];?>
Explanation: everytime I mouse over the HTML part on the page, it executes the sfpRx() function that makes an ajax call to sfp-load.php. This Php page should return "3FE62600AA" to the ajax call, which should get printed in the console.
Problem: the "3FE62600AA" never gets printed in the console but I'm certain that the sfpRx() function is called because it prints "sfpRx Was executed" in the console. What could be happening? Am i forgetting anything? I'am sure the sfp-load.php page is in the NOKIA/ folder. I'am really annoyed with this.