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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fetching data from mysql

Status
Not open for further replies.

rshandy

Technical User
Dec 26, 2003
91
US
Thanks to all the great posts, I currently have an html page that changes about 20 or so fields on an html page depending on what graphic the user clicks on. The data is was initially created in an array in a js in the header of the document.

I then created an external js script to house that array and its still works fine. The problem is that the data in the array needs to change/be updated from a database - I thought mysql would be a logical choice as my softcart database is too quirky in this approach.

Can anyone tell me if its possible to retreive mysql data from a static html page, after the page is loaded.

Would it be logical to have an external js script that calls a server side program that fetches the data (i.e perl, PHP)??? And if so, what would that look like.

Any thoughts or direction would be a great start.

Thanks,

Rich
 
Maybe it's time to give the people who wrote softcart.exe a call, get them to help you. Most likely there will be a new version out by now that will solve all these issues you are experiencing.

All the best,
Jeff
 
Hi Adam:

Trying to use your idea...

Calling the function from a text link:

<a href='javascript:execPerlJS(" this one</a>

coming up with an error line 26 char 3: which may be the eval(o.responseText) - what does this do?

I took it out but it doesn't look like its executing the pl script

Any suggestions?

Rich
 
The script I posted will execute any text returned by the perl script as JavaScript. So if your perl script returns the text "alert('Hello World')" then "Hello World" will be shown in a dialog box.

I tried going to the url in your last post, and it just tried to download the file instead of executing it. That makes me think you don't have your web server setup correctly to serve perl scripts.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top