<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>jQuery AJAX And Timeout Demo</title>

	<!-- Linked files. -->
	<script type="text/javascript" src="jquery-1.3.1.pack.js"></script>
	<script type="text/javascript">

		$(
			function(){
				// Fire off AJAX request.
				$.ajax(
					{
						// Define AJAX properties.
						method: "get",
						url: "timeout.cfm?timeout=5000",
						dataType: "json",
						timeout: (2 * 1000),


						// Define the succss method.
						success: function(){
							$( "#response" ).text( "Success!" );
						},


						// Define the error method.
						error: function( objAJAXRequest, strError ){
							$( "#response" ).text(
								"Error! Type: " +
								strError
								);
						}
					}
					);
			}
			);

	</script>
</head>
<body>

	<h1>
		jQuery AJAX And Timeout Demo
	</h1>

	<p>
		Loading AJAX.....
	</p>

	<p id="response">
		<!-- Reponse. -->
	</p>

</body>
</html>