Teach you the basic syntax of a few of the ajax handlers bulit into jQuery and to show one special effect to spice things up for you by use of the show() and hide() methods with a "slow" fade and show attribute applied. Additionally, the commentary below the source code box shown below discusses how to load remote URLs or data from other sites briefly. The files loaded during this demonstation are on the same domain as the page making the AJAX requests.
Div 2 - Remote file loaded using the jQuery.ajax() method using http POST method.
Using AJAX handlers in various browsers is limited generally to loading files or making requests only to the same domain as the requesting page. This limitation exists in current security models in modern browsers intended to prevent a page shown through domain 123abc.com from loading pages from xyz.com or other domains. There is a simple and effective way to get around this limitation in today's browsers, but involves a server side script to act as a worker bee, so to speak, for the browser. This work bee, or intermediate step in making remote requests, is referred to as a web proxy. The normal approach is to setup a server side script that acts as a proxy or a go between to load the remote page or make remote requests and then output the data or web page to the web browser. It's a simple approach generally, security considerations aside, and we will address that and show examples of server side proxy scripts in another lesson...
The next lessons takes a look at some completely new material not related to Ajax handlers at all. We will explore "Drag & Drop" next. Click here to go to the next lesson.
If you liked these lessons, please help support my continued efforts and make a donation. Even a couple dollars will be appreciated greatly to help pay for the many costs involved in running my consulting business, which are substantial and increasing regularly. Thank you!