Results 1 to 5 of 5

Thread: what I'm I missing with this code

  1. #1
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default what I'm I missing with this code

    I'm attempting the animation with the flipping pages I found on this site, and I have inserted my pictures, but I keep getting white pages with a little red X on them. What am I missing? I have put the HTML language below. At the bottom appears to be my problem. Any solutions?

    Zachary


    <script type="text/javascript">

    /***********************************************
    * Book Flip slideshow script- © Ger Versluis 2003
    * Permission granted to DynamicDrive.com to feature script
    * This notice must stay intact for use
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/

    /********************************************************
    Create a div with transparent place holder in your html
    <div id="Book" style="position:relative">
    <img src="C:\placeholder.gif" width="144" height="227">
    </div>
    width = 2*book image width +4 height = book image height+2

    Insert onload in body tag
    <body onload="ImageBook()">
    *********************************************************/

    // 7 variables to control behavior
    var Book_Image_Width=140;
    var Book_Image_Height=225;
    var Book_Border=true;
    var Book_Border_Color="gray";
    var Book_Speed=15;
    var Book_NextPage_Delay=1500; //1 second=1000
    var Book_Vertical_Turn=0;

    // array to specify images and optional links. At least 4
    // If Link is not needed keep it ""

    Book_Image_Sources=new Array(
    "Zachary's stuff\lovenebraskagolf.com\practice\photo1.jpg","http://www.lovenebraskagolf.com",
    "Zachary's stuff\lovenebraskagolf.com\practice\photo2.bmp","http://www.playthewest.com",
    "Zachary's stuff\lovenebraskagolf.com\practice\photo3.jpg","", //this slide isn't linked
    "photo4.jpg","http://www.yahoo.com" // NOTE No comma after last line
    );

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hiya: Please link absolutely rather than relatively.

    So instead of "Zachary's stuff\lovenebraskagolf.com\practice\photo1.jpg"
    Try "www.host.com/host/pic.jpg"

    And www.host.com/host/placeholder.gif instead of C:\placeholder.gif

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by cr3ative
    Hiya: Please link absolutely rather than relatively.
    There's nothing wrong with relative addresses. In fact, they are typically preferable. The problem here is the use of the local (rather than the remote) filesystem.

    In principle, relative address would allow you replicate the remote filesystem on a local machine and test the site in either location. Moreover, migration from one location to the other doesn't require alteration to every single internal URL in every single document. The only way that this can be true with absolute URLs is you run a web server (for testing, or otherwise) on your machine. Even then, the host address has to be omitted and you'll probably have to virtual hosts (if you maintain more than one site).

    Mike

  4. #4
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, in the code below, you can see I have customized my web links, which do work. I have created photos named photo1.jpg, photo2.jpg, photo3.jp, etc. Everything works except the photos don't appear. I'm sorry I don't understand some of the language, but if someone can just tell me where I've gone wrong in my example below. Thanks a bunch, from a rookie.




    /********************************************************
    Create a div with transparent place holder in your html
    <div id="Book" style="position:relative">
    <img src="placeholder.gif" width="144" height="227">
    </div>
    width = 2*book image width +4 height = book image height+2

    Insert onload in body tag
    <body onload="ImageBook()">
    *********************************************************/

    // 7 variables to control behavior
    var Book_Image_Width=140;
    var Book_Image_Height=225;
    var Book_Border=true;
    var Book_Border_Color="gray";
    var Book_Speed=15;
    var Book_NextPage_Delay=1500; //1 second=1000
    var Book_Vertical_Turn=0;

    // array to specify images and optional links. At least 4
    // If Link is not needed keep it ""

    Book_Image_Sources=new Array(
    "photo1.jpg","http://www.lovenebraskagolf.com/travel",
    "photo2.jpg","http://www.lovenebraskagolf.com/reviews",
    "photo3.jpg","http://www.lovenebraskagolf.com/index",
    "photo4.jpg","http://www.lovenebraskagolf.com/benson" // NOTE No comma after last line
    );

  5. #5
    Join Date
    Nov 2004
    Location
    Here to often...
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hiya,

    This may seem like a silly question but have you uploaded your pictures to the correct folder on your server? This is the most common problem. Also after your link remember to add .htm or .html whatever you save your files as for example
    "photo1.jpg","http://www.lovenebraskagolf.com/travel.htm",
    again this can cause problems. Also check that the picture size is not to big, I keep mine under 50k if possible as this can cause problems on various hosts. I havnt yet played with your code I thought I would put some suggestions out there for you but I will be happy to look if this doesnt solve your problem.

    regards
    Donna

Bookmarks

Posting Permissions

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