473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Firefox Javascript <-> DB

Hi everybody,

Does anybody know how to access a remote database (say Oracle) from
JavaScript code (within a Firefox Extension) ?

I know ADO via ActiveX in the IE world and think a similar thing exists
in Firefox.

Thanks a lots,

Guillaume from France
Jul 23 '05 #1
4 2038


Guillaume CABANAC wrote:
Does anybody know how to access a remote database (say Oracle) from
JavaScript code (within a Firefox Extension) ?


I googled and found
<http://eu.mozdev.org/Brussels2003/talks/jan/index.html>
I am not sure whether that is about a local or a remote database.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
There has been a lot of progress lately in getting javascript to talk
to a server.

In the past projects such as JSRS
(http://sourceforge.net/projects/js-rs) were helpful by providing a
cross browser solution to contacting a server and retrieving info
through javascript. I've found it very useful, and it's a good
starting point.
JSRS Abstract:
JavaScript Remote Scripting Transfer Javascript data without reloading
the webpage. Call functions or methods on the server through
Javascript. Works without the use of any Java nor plugins. Supports
NS6.2, IE5.5 and up. Parameters passing is wrapped.
Another great solution, but it's not completely browser independent, is
the XMLHTTPRequest object. This has become more popular for a lot of
reasons. It's easier to use, implements XML to relay data, and it is
supported by most browsers (not opera or konquerer that I know of).
However, the XMLHTTPRequest object is becoming more standard and
accepted (opera will support it in version 8.0)

One of the reasons why this has started to become more popular, believe
it or not, is that Google is starting to use it in their online apps.
Gmail (http://www.gmail.com), Google suggest
(http://www.google.com/webhp?complete=1&hl=en), and Google
Maps(http://maps.google.com) use it as core function. It's some pretty
cool stuff.

The XMLHTTTP object is designed to be given a url and callback
function. Then once the call to the server is made and a response is
retrieved by the browser the callback function is executed. I've found
a few good sites that go into detail and have some good examples.

http://webfx.eae.net/dhtml/xmlextras/xmlextras.html

http://www.adaptivepath.com/publicat...ves/000385.php

http://jibbering.com/2002/4/httprequest.html

One more solution that may be worth looking into is the XML for
<script> open source project (http://xmljs.sourceforge.net/). This
project was mainly developed to provide the XML Document Object Model
for javascript, but it has some other functionality that allows talk
back and forth to a server from within the javascript framework.

I prefer using a mix of the all three approaches in using javasccript
to get data from a server. I enjoy the XML Document Object Model that
is available with the XMLHTTP object, but I can't sacrifice the browser
compatibility support that JSRS affords. So nice mix works pretty
well.

I hope this is what you're looking for. I didn't post any code
snippets since the links I've given do a much better job.

I think this info should get you started.

Good Luck

Jul 23 '05 #3
Thanks a lot for having spent time answering ! Usenet is really an
efficient way to learn from people.

I would like to build an application that would allow users to see and
post annotations on web documents. So I thought I could code :
- the project's functionnal core in Java (provide services hidding
the DB connexion : getAnnotation, setAnnotation...)
- javaScript code for presentation : asks the java code when a page
is loaded by the browser, retrieve annotations and insert then into the html
file using DOM + CSS

As far as I can see, I can
- retrieve IE browser events from javascript
- warp my Java core in a home made ActiveX in my JavaScript code
(with Sun's Java-ActiveX bridge)

a schema may help you understand my proposal:

DB <-- JDBC --> Java functionnal core <-- ActiveX --> JavaScript <-- events,
DOM, CSS --> MSInternet Explorer

The only problem : it is too complex and may be simplified with
XMLHTTPRequest ??? What do you think about it ?

Thanks, Guillaume
"Terriblecow" <te*********@gmail.com> a écrit dans le message de news:
11**********************@o13g2000cwo.googlegroups. com...
There has been a lot of progress lately in getting javascript to talk
to a server.

In the past projects such as JSRS
(http://sourceforge.net/projects/js-rs) were helpful by providing a
cross browser solution to contacting a server and retrieving info
through javascript. I've found it very useful, and it's a good
starting point.
JSRS Abstract:
JavaScript Remote Scripting Transfer Javascript data without reloading
the webpage. Call functions or methods on the server through
Javascript. Works without the use of any Java nor plugins. Supports
NS6.2, IE5.5 and up. Parameters passing is wrapped.
Another great solution, but it's not completely browser independent, is
the XMLHTTPRequest object. This has become more popular for a lot of
reasons. It's easier to use, implements XML to relay data, and it is
supported by most browsers (not opera or konquerer that I know of).
However, the XMLHTTPRequest object is becoming more standard and
accepted (opera will support it in version 8.0)

One of the reasons why this has started to become more popular, believe
it or not, is that Google is starting to use it in their online apps.
Gmail (http://www.gmail.com), Google suggest
(http://www.google.com/webhp?complete=1&hl=en), and Google
Maps(http://maps.google.com) use it as core function. It's some pretty
cool stuff.

The XMLHTTTP object is designed to be given a url and callback
function. Then once the call to the server is made and a response is
retrieved by the browser the callback function is executed. I've found
a few good sites that go into detail and have some good examples.

http://webfx.eae.net/dhtml/xmlextras/xmlextras.html

http://www.adaptivepath.com/publicat...ves/000385.php

http://jibbering.com/2002/4/httprequest.html

One more solution that may be worth looking into is the XML for
<script> open source project (http://xmljs.sourceforge.net/). This
project was mainly developed to provide the XML Document Object Model
for javascript, but it has some other functionality that allows talk
back and forth to a server from within the javascript framework.

I prefer using a mix of the all three approaches in using javasccript
to get data from a server. I enjoy the XML Document Object Model that
is available with the XMLHTTP object, but I can't sacrifice the browser
compatibility support that JSRS affords. So nice mix works pretty
well.

I hope this is what you're looking for. I didn't post any code
snippets since the links I've given do a much better job.

I think this info should get you started.

Good Luck

Jul 23 '05 #4
On 2005-03-21, Martin Honnen <ma*******@yahoo.de> wrote:
I googled and found
<http://eu.mozdev.org/Brussels2003/talks/jan/index.html>
I am not sure whether that is about a local or a remote database.


According to that old talk, they only had Postgres support. They have MySQL
and SQLite working now, but I believe you still have to recompile the
browser, which just seems so 90s to me. There's also another project to
unify Mozilla database service code using SQLite3 (mozStorage). Too bad
about the duplication of effort. mozStorage is described in this bug
report:

https://bugzilla.mozilla.org/show_bug.cgi?id=261861

Dave Cook
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
12
by: Howard Kaikow | last post by:
Yesterday, I decided to try Firefox. I've encountered a behavior that is either a bug in Firefox or a bug in my Javascript code. I'll try to explain the problem, hoping that this newsgroup can...
4
by: Luke Venediger | last post by:
Hi there, Please help. I cannot get a javascript function to be called from an img tag when the page loads. Here is a snippet of my code, and I'm trying to call the MM_nbGroup function, but this...
2
by: Stewart | last post by:
Originally posted in comp.lang.javascript: Newsgroups: comp.lang.javascript From: "Stewart" Date: 23 Aug 2005 02:50:04 -0700 Local: Tues, Aug 23 2005 10:50 am Subject: FireFox, RemoveChild,...
3
by: jimmygoogle | last post by:
I posted earlier with a scope problem. I think I resolved it in IE but in Firefox it still exists. Anyone have any ideas/experience with this? I attached my code sorry it is so long. You can...
4
by: dsimmons | last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a problem that someone thinks might be associated with Firefox browsers. I'm hoping to find someone in this forum that might be...
4
by: petermichaux | last post by:
Hi, I'm hoping for a reason I'm wrong or an alternate solution... I'd like to be able to dynamically include some javascript files. This is like scriptaculous.js library but their solution is...
9
by: toby989 | last post by:
Hi All Does anyone have an idea why firefox applies the spec in the CSS to the contents but IE does not? Thanks. Toby
11
by: minnesotti | last post by:
Hi there, I subscribed to a photographic pictures-hosting website which is heavy on JavaScript. My preferred latest browser Mozilla Firefox does not work with it -- no pictures are displayed and...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.