Let’s recap. This will be made in AJAX. AJAX uses javascript, so that means that we will have to use <script> tags. These should be found resting comfortably in <head> tags.
<script type=”javascript”>
.
.
.
</script>
For XHTML Strict validation, make sure you use the “type” attribute.
<script type=”javascript”>
var XMLHttpRequestObject = “false”;
</script>
In javascript we declare variables by using the var keyword. Translation: when we want to tell javascript that we want to make a variable, we have to use the word var. It’s a special word that javascript recognizes.
But what is a variable? Something that holds a value that can change. For example, in math, “x” can be “blue” or “5″ or “store”. Just like “”X” can change in math, so can a variable.
That variable name sure is long. You can feel free to make it shorter if you want, but make sure your naming is consistent - same name, same exact capitalization and spelling. JAVASCRIPT IS CAPITALIZATION AND SPELLING ANAL!!!!!!!! I can’t tell you the half, but in the eyes of Javascript, milk, Milk, and MilK are three totally different things.
<script type=”javascript”>
var XMLHttpRequest = “false”;
if(window.XMLHttpRequest){
XMLHttpRequestObject = new XMLHttpRequest();
} else (window.ActiveXObject){
XMLHttpRequestObject = new ActiveXObject(”XMLHTTP.Microsoft”);
}
Whew! Let’s talk about this little bit here.