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 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Image issues with script pasted into FrontPage

    I am not a programmer, so please excuse me if this is dumb, but I have truly searched to try to find an answer. I built my website with Frontpage, and wanted to add a slide show. I found several great scripts on Dynamic Drive. When I paste them, and define the necessary variables, they work great in "Preview" mode in FP, but the images do not appear when the website is posted. I suspect there is a problem in how I'm defining images (I am not linking them). This has happened to all 3 of the various scripts I have tried. Can someone tell me what I'm doing wrong??
    Thanks in advance.
    Alex

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Usually find that when I don't write the source of the image in the directory properly. Can you post us your code? Put it in [code] brackets. Or a link would do, but I'm guessing it's just that, I always forget about that still
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #3
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks bradyj
    To follow is the code i pasted. I also created a child page to this one, where I loaded all of the .jpg images listed in the array, so that they would be listed in the FP folder list (which they are).
    [
    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Slide Show</title>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta name="Microsoft Theme" content="copy-of-poetic 011, default">
    <meta name="Microsoft Border" content="t, default">
    </head>

    <body>
    <p>This page currently under construction. Visit here again soon.</p>
    <p align="center"><input type="button" id="btnPrev" value="<< Previous" onclick="Prev();"> <input type="button" id="bntPlay" value="Play - Stop" onclick="Play()"> <input type="button" id="btnNext" value=" Next >> " onclick="Next();"></p>

    <p align="center"><img id="_Ath_Slide" onload="OnImgLoad()"> </p>

    <p align="center"><b>Description:</b> <SPAN id="_Ath_FileName"> </SPAN> <br>
    <b>Number of Pictures: <SPAN id="_Ath_Img_X"></SPAN> of <SPAN id="_Ath_Img_N"></SPAN></b></p>

    <p align="center">

    <script language="JavaScript1.2">

    /*
    Interactive Image slideshow with text description
    By Christian Carlessi Salvadó (cocolinks@c.net.gt). Keep this notice intact.
    Visit http://www.dynamicdrive.com for script
    */


    g_fPlayMode = 0;
    g_iimg = -1;
    g_imax = 0;
    g_ImageTable = new Array();

    function ChangeImage(fFwd)
    {
    if (fFwd)
    {
    if (++g_iimg==g_imax)
    g_iimg=0;
    }
    else
    {
    if (g_iimg==0)
    g_iimg=g_imax;
    g_iimg--;
    }
    Update();
    }

    function getobject(obj){
    if (document.getElementById)
    return document.getElementById(obj)
    else if (document.all)
    return document.all[obj]
    }

    function Update(){
    getobject("_Ath_Slide").src = g_ImageTable[g_iimg][0];
    getobject("_Ath_FileName").innerHTML = g_ImageTable[g_iimg][1];
    getobject("_Ath_Img_X").innerHTML = g_iimg + 1;
    getobject("_Ath_Img_N").innerHTML = g_imax;
    }


    function Play()
    {
    g_fPlayMode = !g_fPlayMode;
    if (g_fPlayMode)
    {
    getobject("btnPrev").disabled = getobject("btnNext").disabled = true;
    Next();
    }
    else
    {
    getobject("btnPrev").disabled = getobject("btnNext").disabled = false;

    }
    }
    function OnImgLoad()
    {
    if (g_fPlayMode)
    window.setTimeout("Tick()", g_dwTimeOutSec*1000);
    }
    function Tick()
    {
    if (g_fPlayMode)
    Next();
    }
    function Prev()
    {
    ChangeImage(false);
    }
    function Next()
    {
    ChangeImage(true);
    }


    ////configure below variables/////////////////////////////

    //configure the below images and description to your own.
    g_ImageTable[g_imax++] = new Array ("Angie2.jpg", "This is our receptionist, Angie. She will make your appointment for you!");
    g_ImageTable[g_imax++] = new Array ("Lipo team.jpg", "Bike Rider.");
    g_ImageTable[g_imax++] = new Array ("Infusion2.jpg", "Soccer Player.");
    g_ImageTable[g_imax++] = new Array ("Aspiration2.jpg", "Watch Out!!");
    g_ImageTable[g_imax++] = new Array ("Fat in tubing.jpg", "Hurry Up!");
    g_ImageTable[g_imax++] = new Array ("Canister2text.jpg", "Hurry Up!");

    //extend the above list as desired
    g_dwTimeOutSec=5

    ////End configuration/////////////////////////////

    if (document.getElementById||document.all)
    window.onload=Play

    </script>
    </p>

    <p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
    <a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>
    </body>

    </html>
    ]

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Where are the images saved in relation to this document? In the same folder? In subfolders? Like:
    images -- personal -- pictures
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #5
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    to bradyj

    I saved all the images in a subfolder, and they do appear under the folder tab in FrontPage, but somehow when the site is posted, it is not finding the images. Thanks

  • #6
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alexd225
    I saved all the images in a subfolder, and they do appear under the folder tab in FrontPage, but somehow when the site is posted, it is not finding the images. Thanks
    Bingo -- there is most likely a problem with these lines that have your images then:
    Code:
    g_ImageTable[g_imax++] = new Array ("Lipo team.jpg", "Bike Rider.")
    Any area that says you image name, needs to have the exact file location. Say I save my home page index.html next to a folder called images, and I want to link to those images, then I'd have to write the array:
    Code:
    g_ImageTable[g_imax++] = new Array ("images/Lipo team.jpg", "Bike Rider.")
    or sometimes with javascript:
    Code:
    g_ImageTable[g_imax++] = new Array ("./images/Lipo team.jpg", "Bike Rider.")
    Make sense? if you have a folder beneath a folder, then:
    Code:
    g_ImageTable[g_imax++] = new Array ("images/pictures/Lipo team.jpg", "Bike Rider.")
    or

    Code:
    g_ImageTable[g_imax++] = new Array ("./images/pictures/Lipo team.jpg", "Bike Rider.")
    That's probably it, can't find the images. I hate frontpage, by the way, it should do this for you. If you have them saved right next to the html page without a subfolder, then it would be your original or:
    Code:
    g_ImageTable[g_imax++] = new Array ("./Lipo team.jpg", "Bike Rider.")
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...

  • #7
    New Coder
    Join Date
    May 2004
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I always have a similar problem, but for me its because Frontpage doesn't seem to care about caps when referencing images, but my web host does.

    Digital camera exports as .JPG, photoshop converts to .jpg on a save, and I'm always mixing them up.

  • #8
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks you guys for all your help. I haven't gotten it to work yet, but I'm still trying. I know it has something to do with how I am referencing my images. Thanks also for the tip on JPG vs jpg. I was able to do a simplistic slide show using the Banner Marquis web component. I am learning that FrontPage is a funky little program. Do you guys like Dreamweaver better??
    Alex

  • #9
    Senior Coder
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    2,469
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by alexd225
    Thanks you guys for all your help. I haven't gotten it to work yet, but I'm still trying. I know it has something to do with how I am referencing my images. Thanks also for the tip on JPG vs jpg. I was able to do a simplistic slide show using the Banner Marquis web component. I am learning that FrontPage is a funky little program. Do you guys like Dreamweaver better??
    Alex
    Yeah, Dreamweaver is probably the lesser evil -- I started on DreamWeaver for a couple years, and it works great -- but I felt I was limited and moved on to hand coding. But if you were to pick a program to code for you, dreamweaver is it. It will easily understand your Javascript, as well as many other languages.
    // Art is what you can get away with. <-- Andy Warhol
    ...:.:::: bradyjfrey.com : htmldog : ::::.:...


  •  

    Posting Permissions

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