database

How to access a database

The inherent JavaScript security restrictions prevent us from accessing files or other resources (outside of web accessible content) directly. This means we cannot access a database directly. There is a way around this though, and that is utilizing Ajax.

Via Ajax we can pass a request to a database with a server side resource, get some results back, and then update our page with those results. The results can be whatever we'd like - full tables, report data, or just what background image the user likes.

There are a number of considerations before undertaking this task.