X
xenophon
I am trying to add "click once" functionality to my ASP.NET page. I
have this attribute in my form tag:
onsubmit="return SubmitCheck()"
And I have the below in my <head> tag, but for some reason the click
never gets intercepted. What am I doing wrong?
<script language='javascript' type='text/javascript'>
<!--
function window_onload()
{
var __oldPostBack = __doPostBack;
__doPostBack = SubmitCheck;
}
// -->
</script>
<script language='javascript' type='text/javascript'>
<!--
var submitCount=0;
function SubmitCheck( eventTarget , eventArg )
{
if (submitCount == 0)
{
submitCount++;
return __oldPostBack(eventTarget , eventArg);
}
else
{
alert( submitCount + 'Please wait.');
}
}
// -->
</script>
Thanks.
have this attribute in my form tag:
onsubmit="return SubmitCheck()"
And I have the below in my <head> tag, but for some reason the click
never gets intercepted. What am I doing wrong?
<script language='javascript' type='text/javascript'>
<!--
function window_onload()
{
var __oldPostBack = __doPostBack;
__doPostBack = SubmitCheck;
}
// -->
</script>
<script language='javascript' type='text/javascript'>
<!--
var submitCount=0;
function SubmitCheck( eventTarget , eventArg )
{
if (submitCount == 0)
{
submitCount++;
return __oldPostBack(eventTarget , eventArg);
}
else
{
alert( submitCount + 'Please wait.');
}
}
// -->
</script>
Thanks.