Java Reference
In-Depth Information
Common JavaScript Techniques
JavaScript can be used to add a wide array of features to a web site; however, there are
certain features that are very common. Some of the most common JavaScript enabled fea-
tures used by web sites include:
• Automatic Choice Lists
• JavaScript Includes
• JavaScript Forms
• Asynchronous JavaScript and XML (AJAX)
Of course, there are many additional JavaScript features and techniques beyond these.
However, learning to handle these common techniques will enable you to understand and
implement bots to handle other techniques as well.
From a bot's perspective, JavaScript does very little. A bot does not need to actually
execute the JavaScript to work properly. The web browsing experience is still just a series of
HTTP request sand response packets. You must understand how the JavaScript influences
the HTTP request packets, or simply use a packet sniffer to examine them. As long as your
bot sends the same HTTP request packets as a browser does, your bot will function cor-
rectly.
We will now examine each of the common JavaScript techniques.
Working with Automatic Choice Lists
Choice lists are very common on web sites. A choice list is a drop-down list that allows
the user to select from several options. Choice lists are often part of HTML forms. In addi-
tion, you may have also seen automatic choice lists. Automatic choice lists are usually not
part of an HTML form, and will navigate when the user selects an item, or with the use of an
HTML button next to them.
Automatic choice lists are usually used for site navigation. When you select one of the
options on the automatic choice list, you will be instantly taken to a new page on the web site.
To see an example of an automatic choice list, visit the following URL:
http://www.httprecipes.com/1/9/article.php
Search WWH ::




Custom Search