Is it possible to query the database in a javascript function?
Thanks, Tom
jatar_k
6:52 am on Mar 6, 2006 (gmt 0)
not so far as I know
DrDoc
7:04 am on Mar 6, 2006 (gmt 0)
If you mean, connect to MySQL directly from JavaScript -- no, that's not possible. JavaScript is a client side scripting language. As such, even if you could, you would not want to do server stuff, as everything would be clearly visible to everyone.
You can, on a slightly unrelated plane, trigger the actual querying of the db from JavaScript. It would, however, have to be done by a PHP script in the end.