Hi,
I’m using a simple bit of JS to confirm a user meant to click on a link using the following code:
[COLOR=red]<script language=”JavaScript”>
function myverify(type, id) {
if(type == “forfeit” and confirm(“Are you sure you want to forfeit this game? You will receive a lower rating.”) == true) {
window.location = ‘scripts/forfeit.php?game=’;
}
if(type == “cancel” and confirm(“Are you sure you want to cancel this game?”) == true) {
window.location = ‘scripts/cancelpendinggame.php?game=’;
}
}
</script>
and calling it using:
[COLOR=red]<a href=”#” onClick=”myverify(‘forfeit’, ‘5’); return false;”>Forfeit</a>
Anyone know why this isn’t working?