473,381 Members | 1,428 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,381 software developers and data experts.

Javascripts and databases

71
I have a javascript that scrolls through a series of "headlines" - essentially key points for the month or week for our customers, or key changes to our website, prices, etc.

right now the sctipt essentially has an array of strings that gets read into a function and changed into a line of html code.

myArray =[['link','text'],[..],..]

I would like to have this linked to a database, so that it will read the link and text fields from a table - this will make things easier to update.

Could anyone help me with the code I need to link the database through javascript? I've done it in vbscript before, but never javascript.

Thank in advance for any help you can offer.
Sep 17 '07 #1
4 1031
acoder
16,027 Expert Mod 8TB
JavaScript cannot access a database, but you could use Ajax (see links in Offsite Links thread) which makes a request to a server-side script.
Sep 17 '07 #2
rsteph
71
So then I could use a server-side script to access a database, and then use Ajax to link between that include, and the javascript?

JavaScript cannot access a database, but you could use Ajax (see links in Offsite Links thread) which makes a request to a server-side script.
Sep 17 '07 #3
epots9
1,351 Expert 1GB
So then I could use a server-side script to access a database, and then use Ajax to link between that include, and the javascript?
ajax == javascript
Sep 17 '07 #4
acoder
16,027 Expert Mod 8TB
So then I could use a server-side script to access a database, and then use Ajax to link between that include, and the javascript?
In a way, yes, but not quite. The Ajax code that you would use is actually just Javascript code (as pointed out by epots9), but it does allow you access to the response from the server. This, you could then use in your non-Ajax Javascript functions/code.
Sep 18 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kerberos | last post by:
When I deliver a page as text/html, the javascripts work, but if delivered as application/xhtml+xml, the javascripts don't work: function OpenBrWindow(theURL,winName,features, myWidth, myHeight,...
2
by: sdvoranchik | last post by:
We have an application that contains links that run javascripts to create pages in a separate frame. When these links open an external site, it causes the javascripts to no longer function. When...
2
by: LC's No-Spam Newsreading account | last post by:
I asked a couple of days ago about the following arrangement (simplified). I made some progress using netscape.security.PrivilegeManager.enablePrivilege but still have to ask some further help. ...
4
by: David Virgil Hobbs | last post by:
My web host inserts banner ads into my html pages. The javascript in these banner ads interferes with the onload triggered javascript functions in my pages. Whether I trigger my javascript...
4
by: swayze | last post by:
Hi, I'm sending some vars to php from javascript. These vars contain special chars (like "&" ,",")and also turkish characters. Therefore I'm using javascripts escape() function to be able to...
2
by: Pavils Jurjans | last post by:
Hello, I am looking fow C# equivalent of JavaScripts escape() and unescape() functions. I need to use C# function at the server side and then be able to use the opposite at the client side. ...
1
by: somaskarthic | last post by:
Hi In my PHP page while viewing the page source , it shows all the javascript codings and php comments. I don't want these comments and javascripts visible . Is there any methods to hide the...
2
by: stroumf | last post by:
Hey, My problem is the following: I need to use functions from different javascripts and I don't want to load all the javascripts initially. So I need to load the scripts on demand. Now I know...
4
by: januarynow | last post by:
Generally, my site contains javascripts (a couple of freebie counters plus some CPM (pay-per-impression) and CPC (pay-per-click) ads), from four different firms, but they are all suffering from the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.