Re: Can I use a server function and a client funtion in a button click Event?

From: dlbjr (oops_at_iforgot.com)
Date: 05/27/04


Date: Thu, 27 May 2004 16:25:06 -0500

Save this as an htm and try it

<html>
<head>
<title>Test Page</title>
<script type="text/javascript" language="JavaScript">
function hitserverfunction() {
 document.body.style.cursor='wait';
 var XMLHTTP = new ActiveXObject( "Microsoft.XMLHTTP" );
 var sURL = "http://www.dlbjr.com/test.asp"
 XMLHTTP.open( "POST", sURL, false );
 XMLHTTP.send();
 result.innerHTML = XMLHTTP.responseText;
 document.body.style.cursor='auto';
}
</script>
</head>
<body>
<input onclick="hitserverfunction();" id="Button1" type="button" value="Process" name="Button1">
<br/>
<br/>
<div id="result"></div>
</body>
</html>

'from dlbjr

'Unambit from meager knowledge of inane others,engender uncharted sagacity.