So I have an ajax request that works fine when I just put the file name ex:
var security = function(){
var link = $('#chosen').attr('href');
$.get('func.php',function(result) {
if (result > 75 && result % 5 === 0){
$('#chosen').attr("href", link);
}else{
$('#chosen').attr('href','https://www.google.com');
}
});
$("#chosen").click(function(){
$.get('func2.php',function(results){
if (results === results){
location.reload();
}
});
});
$("#chosen").click(function(){
$.get('func3.php',function(results){
if (results === results){
}
});
});
};
I wanna make the func.php functions recheable from anywhere so i havean url named cligit.com i tried linking it like thisbut when i do that it stops working
var security = function(){
var link = $('#chosen').attr('href');
$.get('http://www.vanillacomp.com/browse/func.php?callback=?func.php',function(result) {
if (result > 75 && result % 5 === 0){
$('#chosen').attr("href", link);
}else{
$('#chosen').attr('href','https://www.google.com');
}
});
$("#chosen").click(function(){
$.get('http://www.cligit.com/func2.php',function(results){
if (results === results){
location.reload();
}
});
});
$("#chosen").click(function(){
$.get('http://www.cligit.com/func3.php',function(results){
if (results === results){
}
});
});
};