PDA

View Full Version : body on load problem (I think)



parti_poodle
10-16-2004, 02:29 PM
This is concerning the following script:

Book Flip Slideshow IE

Credits:
Name: Ger Versluis
Homepage: Homepage


This is what is happening: When the page loads, the transparent gif is showing up but there is no "flipping" and the photos don't show up. Here is the URL of my "test page" with the results I'm getting:

http://www.parti-poodle-sw.com/photos/logo_misc/advertisement_slidshows/book_slideshow/book_slideshow.html

What I have checked:

I've double checked and triple checked the "image array" for extra or missing " etc.... I don't think the problem is there.

I believe the placeholder is working properly since it shows up ok on the published page.

The instructions call for the following.....
Insert onload in body tag <body onload="ImageBook()">

WHAT I THINK THE PROBLEM IS:

Should I have the "imagebook" named something else? The instructions say to "insert onload in body tag" I've tried copying & pasting this exact tag elswhere on the page, I've tried copying and pasting it elsewhere within the script itself..... Still same results.

I'm including the first part of the script below (the instructions and all of the image array (in short, anything I am supposed to edit and not the entire script) Any help is appreciated....

<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="http://www.parti-poodle-sw.com/photos/logo_misc/advertise ment_slidshows/book_slideshow/placeholder.gif" width="284" 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(
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/welcome.jpg","",
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/availablepups.jpg","http://www.parti -poodle-sw.com/available_puppies.html",
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/aboutpoodles.jpg","http://www.parti- poodle-sw.com/about_poodles.html",
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/aboutus.jpg","http://www.parti-poodl e-sw.com/about_us.html",
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/parents.jpg","http://www.parti-poodl e-sw.com/parents.html",
"http://www.parti-poodle-sw.com/photos/logo_misc/advertisement _slidshows/book_slideshow/poodlesathome.jpg","http://www.parti -poodle-sw.com/our_poodles_at_home.html"


// NOTE No comma after last line);

/***************** DO NOT EDIT BELOW **********************************/

cr3ative
10-16-2004, 05:24 PM
You need to enter this line:
<body bgcolor="#FFFFFF" link="#3333CC" scroll="auto" vlink="#6633CC" onload="ImageBook()">

to replace this line:
<body bgcolor="#FFFFFF" link="#3333CC" scroll="auto" vlink="#6633CC">


Then, put the script anywhere below there but before </body>.

Also, for the attention of ddAdmin, the script is marked as IE only but the description is as follows:
A DOM based script that works in modern DHTML browsers- IE5+, NS6+, Opera 7+.

cr3ative

parti_poodle
10-16-2004, 06:03 PM
Thank you for the responce cr3ative. I've seen your replys on a lot of posts and novices and "hacks" like myself really appreciate it.

I don't really have access to the "body tag" itself as this website is a "template" website. I can alter of course the "title" tag, the "keywords" tag, and the "head" tag but not the body tag.

I've used a similar slideshow by Ger Versluis called the "Carousel slideshow" with what appears to be the exact same instructions and somehow I was able to make it work on this same website. How I don't remember and I did not save the script.

Is there another way to make the "onload" command work?

Byrne

cr3ative
10-17-2004, 07:20 AM
With your permission I can edit your website to make it work and save a copy here. When I save it here, try not to edit it with your HTML program as it seems to be playing up.

cr3ative