We have chosen a simple example in order to show how we can create components, register to their events, and see the order in which their events are raised. The custom components are included in the page by referencing their JavaScript source files:
<head>
<title>Microsoft AJAX Library Case Study: Creating Custom Client
Components</title>
<script type="text/javascript" src="Scripts/MicrosoftAjax.js">
</script>
<script type="text/javascript" src="Scripts/Timer.js">
</script>
<script type="text/javascript" src="Scripts/Dictionary.js">
</script>
<script type="text/javascript" src="Scripts/EnhancedTextBox.js">
</script></head>
The user interface has only one textbox that we will enhance using the EnhancedTextBox
behavior. The textbox is defined like this:
<form>
<input type="text" id="name" /></form>
We add the new behavior to this textbox during the init
event of the application...