Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database connection with Javascript?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How Database connection,and interacting with data is possible with help of javascript?

Thanks in Advance.
 
you should consider using a server side language
would it only be for security reasons !!!!!!!
 
Yes, it's possible to connect to a database with Javascript in certain limited situations:

1. Use server-side Javascript. But remember, server-side Javascript is a different animal from the Javascript you use in your browser, so there is no magic here. Basically it works just like any other server scripting language does (PHP, Perl, ASP, etc...): it interprets the contents of a web page before serving out to the browser. Server-side Javascript can be used in Netscape's webserver, or in a Windows IIS/ASP system. (Yes, you are not limited to VBScript)

2. Use a Microsoft IE4+ proprietary extension called Data Binding, which does allow you to use client-side Javascript (actually JScript), but it is not considered a good programming practice to use in a public website, since it is a definite security risk, and I believe it involves special ODBC settings on the client computer. This usage is usually limited to small Intranets.

3. Mixed: use a server-side language to query parts of the database (be careful with the amount of data you send), then serve it to the browser as a Javascript array, thus allowing you to do client-side data manipulation without waiting for every small update. When client-side manipulation is done, you can flatten the Javascript array and place it in a hidden form field to send back to the server. This approach can be a little difficult to program, but can make a web-based application act more like a 'real' piece of software.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top