#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    6
    Rep Power
    0
    I want visitors of my website to click on thumbnails to get a larger image in a new browser window plus to play music. I managed the first part (which is simple). How can I link the sound additionally and make it play in the new window, which just contains the image (meaning that the URL of this image page ends with "xyz.jpg")? Any help is appreciated! ~Gabi
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,646
    Rep Power
    4492
    You'll probably have to use some kind of script with this. If you open a url with just a .jpg picture, then you can't do anything else, you're not opening up any code.

    if you create a script that is passed the name of the pictures, xyz.jpg, and then it also embeds the sound, xyz.mp3 (or whatever), then it will work. but you'll have to learn some scripting languages and have a host that supports them.

    Look into either Perl or PHP. PHP is easy to learn, but Perl has been around a lot longer.

    Maybe there is a javascript way to do it on the same page, without opening up a new window. Ask on the javascript forum...

    ---John Holmes...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    6
    Rep Power
    0
    Thanks very much! I will follow your advice and post the message in the javascript forum.

    Gabi
  6. #4
  7. No Profile Picture
    ssvr6
    Guest
    Devshed Newbie (0 - 499 posts)
    Embed the sound file in the new browser window would be the easiest(if it's .htm). What format is in? .wav?

    If so, thy this:
    <EMBED SRC="YourSound.wav" HIDDEN=TRUE>

    It will play as the window loads (or is done loading.)

    If you want some thing different, try this javascript.
    <SCRIPT Language="JavaScript">
    function PlaySound(sFile){
    window.location.href=sFile;
    }
    </SCRIPT>
    <A HREF="ThisImage.jpg" OnClick="PlaySound(sound.wav);">Link is here</A>

    Good Luck!

    Steve

    ------------------
    Web Application Developer
    steveingels@dbt.net


    [This message has been edited by ssvr6 (edited November 07, 2000).]
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    6
    Rep Power
    0
    Thanks very much. The file will probably be either .wav or .mp3. I will try the javascript solution as soon as I will have some time ;-)

    ~Gabi

IMN logo majestic logo threadwatch logo seochat tools logo