Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy check this java script/applet out.

    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/hs...hslideshow.php

    i hope u can understand me?..i am lost here...pls help.
    Warm Regards,
    Mivec

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •