Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 30th, 2008, 11:26 AM
Registered User
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing data from Database using Javascript


I have a requirement " Accessing data from a database using Javascript" but I can't know how to implement this.
please help me.

Old July 30th, 2008, 01:45 PM
Friend of Wrox
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts

You can't.

Not if you mean JavaScript in the browser.

You *could* use ASP and then use JScript (Microsoft's implementation of JavaScript) on the server. But that's a completely different thing.


I have to be honest and admit that *technically* you *can* use JavaScript in the browser to get data from a database, but:

(1) The browser user has to *allow* the use of components that are marked as "unsafe for scripting" (and they are! used wrong, they could wipe out things!).
(2) The browser user has to mark your site as a "trusted site".
(3) Depending on what kind of database you are talking about, you might still have enormously complex connection issues.

In short, even though it's theoretically possible, it's a really really bad idea. And probably won't work the way you want it to, anyway.

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem Accessing Access Database using JavaScript kumar_siva Javascript How-To 3 February 8th, 2006 01:45 PM
Problem accessing Access Database using JavaScript kumar_siva Javascript 0 February 7th, 2006 07:09 AM
Accessing bound controls through javascript dungerdanish Classic ASP Professional 0 June 21st, 2005 05:23 AM
Accessing arraylist in javascript nazneen Java GUI 0 June 18th, 2003 07:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.