Using Click Interceptions with a Database-Driven Application
One of the most popular approaches used for extending the behavior of database-driven web applications is one widely known as click interception. In case you’ve not heard about it yet, this useful technique consists of using JavaScript to change the default behavior of an element included in a web page when a user clicks on it. This technique expands the element's functionality; it is covered in detail in this four-part series. This article is the third part.
Using Click Interceptions with a Database-Driven Application - The full source code of the improved MySQL-driven application (Page 4 of 4 )
As I promised you in the section that you just read, here are all of the source files that compose this basic MySQL-driven application after the behavior of the user detail web pages has been enriched by means of the click-interception approach:
(definition of 'list_users.htm' file)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
In addition to the source files listed above, below I included an illustrative image that shows how the details of a particular user are displayed on the same web page, instead of opening a new window:
Final thoughts
That's all for now. In this third installment of the series, you hopefully learned how to use click interceptions to extend the existing functionality of a small MySQL-driven web application.
Nevertheless, this educational journey hasn't finished yet, since in its last chapter, I'll show you how to utilize click interceptions to display the contents of different text files on a unique web page container.
Don't miss the next part!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.