I cannot get this function to fire off… I’m thinking I need a fresh set of eyes to look it over. Can someone tell me where the flaw is? Thank You in advance…
Jquery/javascript
function removeAsFriend(a, b, rn) {
$("#remove_friend_loader").show();
$("#remove_friend_loader"+a).show();
$.post("churchScripts/request_join_church.php", { request: "removeFriendship", mem1: a, mem2: b, thisWipit: rn }, function(data) {
if(<?php echo $admin_id ?> != a){
window.location.replace("profile.php?id="a);
}else{
$("#remove_friend_loader"+a).hide();
$("#deleteMember"+a).remove();
$(".mem"+a).remove();
}
});
}
HTML inside a php variable
<div class="interactContainers" id="remove_friend">
<div style="float:right;"><a href="#" onclick="toggleInteractContainers(\'remove_friend\');">cancel</a> </div>
Remove '.$church_name.' from your church list?
<a href="#" onclick="removeAsFriend('.$logOptions_id.', '.$id.', '.$thisRandNum.');">Yes</a>
<span id="remove_friend_loader"><img src="images/loading.gif" width="28" height="10" alt="Loading" /></span>
</div>
Any ideas
EDIT
Clarification on the issue… This Jquery function will not run onclick of the yes link
Thanks, but I just found the issue… I missed the + sign at the window.location which caused a syntax error. Thanks