Java Reference
In-Depth Information
Summary
This chapter showed how to handle JavaScript enabled web sites when writing a bot. The
web server does not handle JavaScript; it is a web browser only technology. As a result, your
bot does not need to be directly concerned with JavaScript. Rather, you the bot programmer
must understand the JavaScript code and ensure that the bot sends the same HTTP requests
that a browser running the JavaScript would.
There are several common JavaScript techniques. One of the most common is using
JavaScript to validate data entered into a form. JavaScript is also often used to provide auto-
matic choice lists, as well as JavaScript includes. This chapter showed recipes that demon-
strate how to handle each of these situations.
Additionally, you can also include a JavaScript interpreter in your programs. Although,
the Rhino JavaScript engine allows your Java applications to execute JavaScript, a bot pro-
gram rarely needs this functionality.
The next chapter will examine one of the most popular ways to use JavaScript. AJAX is a
technology that combines JavaScript and asynchronous HTTP messages to provide very rich
and interactive experiences for the user. In addition, there are special considerations that will
be discussed regarding AJAX processing.
Search WWH ::




Custom Search