473,406 Members | 2,745 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,406 software developers and data experts.

JavaScript & MySQL

Is it possible to use JavaScript & MySQL? What I'm looking to do is
query a database and then output the results in a popup window. I've
got the popup window part down, I just can't figure out how to query
the database.

Is it possible?

TIA,
Benjy

Jun 16 '06 #1
4 1963
linusthefish wrote:
Is it possible to use JavaScript & MySQL? What I'm looking to do is
query a database and then output the results in a popup window. I've
got the popup window part down, I just can't figure out how to query
the database.

On the serverside, yes.
From the client? No

--
Dag.
Jun 16 '06 #2
Basically dag means to say No.

You can't query the server MySQL using Javascript alone. There's no
direct method to achieve it. However if you have access to server side
scripts... you can find a way to work around it.
Dag Sunde wrote:
linusthefish wrote:
Is it possible to use JavaScript & MySQL? What I'm looking to do is
query a database and then output the results in a popup window. I've
got the popup window part down, I just can't figure out how to query
the database.

On the serverside, yes.
From the client? No

--
Dag.


Jun 16 '06 #3
linusthefish wrote:
Is it possible to use JavaScript & MySQL? What I'm looking to do is
query a database and then output the results in a popup window. I've
got the popup window part down, I just can't figure out how to query
the database.

Is it possible?

TIA,
Benjy


Well, under normal circumstances it is not possible, however
I myself do MySql transactions from javascript in the browser
every day.

I created a middleware server on my host that takes a url encoded
request and returns the results as JASONized XML that my scripts convert
back to an XML object passed to a javascript defined callback function

The cross-domain javascript I wrote , simply inserts script tags
dynamically that cause as many transactions with MySql as desired
without a page reload
Jun 17 '06 #4

drclue wrote:
linusthefish wrote:
Is it possible to use JavaScript & MySQL? What I'm looking to do is
query a database and then output the results in a popup window. I've
got the popup window part down, I just can't figure out how to query
the database.

Is it possible?

TIA,
Benjy


Well, under normal circumstances it is not possible, however
I myself do MySql transactions from javascript in the browser
every day.

I created a middleware server on my host that takes a url encoded
request and returns the results as JASONized XML that my scripts convert
back to an XML object passed to a javascript defined callback function

The cross-domain javascript I wrote , simply inserts script tags
dynamically that cause as many transactions with MySql as desired
without a page reload


Dear sir,
That is exactly what the previous posters were saying. JavaScript
cannot work with MySQL alone.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

--
Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

Jun 18 '06 #5

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

Similar topics

4
by: rcb845 | last post by:
Bonjour à tous, Je suis relativement nouveau dans ce monde. Actuellement, je construis des transactions d'administration d'une base de données avec PHP et MySql. J'ai installé sur mon poste...
0
by: Ronan | last post by:
Hi, I have a problem with a form using the PHP PEAR HTML_QuickForm package & javascript: I want to record the content of my form into a mySQL database then execute a javascript function. ...
5
by: Raju V.K | last post by:
I am developing a web site which requires a set og unique values be transferred between pages and server many times. There fore i decided to put the values in an array so that only one reference to...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
5
by: nivas.meda | last post by:
Hi, I have an excel sheet with a graph and cells.If i change the value in the excel cells the graph will reflect.Now i am going to implement this functionality in html page.I successfully saved...
8
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
2
by: Nathan Sokalski | last post by:
I am moving my website from my machine to my webhost, and need some help with what extra files I need to include due to the fact that I used AJAX in my site. Everything on the site is obviously...
4
by: pmactdot | last post by:
Hi, I'm looking for some assistance on a case study...I have two arrays <head>: one for daily special dish name, second for the daily dish description, then I have two document.write: a daily...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.