Anybody got any ideas on this??
Many thanks
Laphan
----- Original Message -----
From: Laphan <laphan@u...>
To: javascript <javascript@p...>
Sent: 04 October 2001 21:31
Subject: [javascript] Re: IMG and Javascript problem
Hi All
Difficult to explain this problem as I haven't clue what is going wrong with
it, so could you please go to the following site:
http://www.eastwicklodge.com
Click the World Cup Rally link on the left hand side.
Click the Daily Progress Report link at the bottom/middle of the page that
appears.
You will now see a list of day links at the bottom. It automatically starts
on the problem page (day 0) so can you click the Read More link just above
day 20.
You will see that a picture should be there, but it ain't. If it is, click
the next Read More button on that page (should now show page 3 of day 0) and
then click the Go Back button. It should show the Image placeholder and the
little red/green/blue squiggle to say that the picture path is valid, but it
won't display it.
If you right-click the placeholder and click Show Picture it comes up - but
that is crap.
Now the way I have built this page is that a JavaScript has each 'page' for
each day in an Array, eg:
thepara[1] = 'The car is fully packed if somewhat overloaded but we do have
our golf clubs on board (one each) and we are all looking forward to plenty
of bunker practice in due course.<BR><BR><IMG SRC="gifs/day0.jpg"
WIDTH="277" HEIGHT="189" BORDER="0">';
In order to cycle through the pages I use the following function:
function UpDown(thepage) {
if (thepage == 0) {
self.Up.innerHTML = '';
self.Down.innerHTML = thedown;
self.theText.innerHTML = thepara[thepage];
return true;
}
if (thepage == 1) {
self.Up.innerHTML = theup;
self.Down.innerHTML = thedown;
self.theText.innerHTML = thepara[thepage];
return true;
}
if (thepage == 2) {
self.Up.innerHTML = theup;
self.Down.innerHTML = '';
self.theText.innerHTML = thepara[thepage];
return true;
}
}
Up is the Go Back button.
Down is the Read More button
Thepara[thepage] is the Array that shows the portion of text that I want.
Can somebody explain how I can get the pics to display properly. Do I have
to preload them into a JavaScript New Image or something??
Many thanks
Rgds
Laphan
laphan@u...