What is the best way to access/query data using javascript. I have to query an Oracle database. Any sample code will be appreciated.
Regards, Neekat
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
JavaScript can not access a database directly. IE can use ActiveX, but that is as close as you can get.
Eric
Nee Kat
Ranch Hand
Joined: Jan 27, 2004
Posts: 37
posted
0
What about an XML document. Can I access data from an XML document using JS. The data is not that much so I can use an XML document. If yes, how to access using JS.
The XML document also has to be on the same domain with Ajax.
Eric
Nee Kat
Ranch Hand
Joined: Jan 27, 2004
Posts: 37
posted
0
I am confused. If the document is stored on C:\home\code\menu.xml so can I access it using this code or not from a template which is stored on the same drive?
var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); xmldoc.async = false; xmldoc.load("C:\home\code\menu.xml")
Regards, Neekat
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
When you mentioned JavaScript, the assumption was that the document would be served by a web server, in which case you can not access a document on a local machine using the "C:\..." notation. If you open the HTML file directly on your local machine, you can, but then there's not much point in making it a web page.