...

View Full Version : check this java script/applet out.



mivec
05-10-2004, 06:09 AM
hi all,
i have got this javascript and i know how it works. but the question is i don't know how to make it fit to my work. u see the script/applet is a picture slider(i will attach the zip file in this thread).

now it calls the two .txt files either it can be slide 1 or slide 2. i may be wrong but if it's ok u can have a look at the attachment i am attaching in this thread.

ok my problem is that, HOW can i make that slider check my database and put whatever pictures there are into the slider itself? fyi, i am using php with phpmyadmin. my database has a table named tblgallery and fields of gallery_id, pic_Path, username. so, what i am trying to do is that to make a query and check for the username and display the picture where pic_Path contains the path to where the picture is kept.

darn, the file is too big. i will paste the url of where i downloaded this javascript/applet here:

http://www.javafile.com/slideshow/hslideshow/hslideshow.php

i hope u can understand me?..i am lost here...pls help.

sad69
05-10-2004, 07:17 PM
There's no attachment...

Further, just by reading your description, the applet currently reads a text file, not a database.

You'd have to re-write the method that reads the text file, and convert it to use JDBC to connect and read your database into a format that the applet currently uses (probably a linked list or array or something..).

If you don't know much about Java (as opposed to Javascript) and more specifically, programming in Java with databases, this is not the easiest (though not the most difficult) thing to do.

Having said that, you have two options:
1. If you REALLY want to use this applet, this thread should be moved to the computer programming forum for help (you should also read up on some tutorials about JDBC and Java... you'll also need JDK to compile the applet).

2. Pick another method of doing a slide show. You could use a PHP slideshow as that would be easiest to connect to MySQL, and put that in an iFrame on your page and make it look pretty close.. probably a bit more reliable than an applet too (as you assume the user to have Java enabled..). I'm sure you could find plenty on HotScripts..

Hope that helps,
Sadiq.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum