No, no, Jason...the val= in the URL has *NOTHING* to do with the state of the flag. It matches the ".gif" image the user clicks on.
Aspless: The issue *MIGHT* be that you are using the numbers 1 and 0 for your flag but then treating them as true/false. Be consistent. And Jason is right, you could do this all with a single function, though not the way he coded it:
Code:
<script>
var already = false;
function gothere(which)
{
if ( already )
{
alert("Please wait...we are already processing your request...");
return false;
}
already = true;
location.href = "tfsubmit.asp?val=" + which;
return false;
}
</script>
<a href="#" onClick="return gothere('t');"><img src="true.gif" alt="True" border="0"></a><a href="#" onClick="return gothere('f');"><img src="false.gif" alt="False" border="0"></a>
Don't forget the return false! And don't forget the return in the onClick. Otherwise, the browser is entitled to refresh the page, going to the top of the page (that's what
href="#" means).