Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can Anyone Help? Slidehow not working

Featured Replies

If you go to http://www.getmecarcredit.net/stock/ on my website you will see it's working fine. If you click onto the name of the car it goes into another page that is meant to show a more detailed example with a slideshow of the cars photos - this isn't happening.

 

The company who made the system are saying they don't provide support for this (despite the fact it's theirs!)

 

The detailed page is based on a file called detail.txt, they sent me the file for this (and although it doesn't work, they're saying they wont help!!)

 

Here is the detail.txt file that they sent me:

 

<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  <META NAME="Author" CONTENT="Dragon2000">
  <META NAME="GENERATOR" CONTENT="Dragon2000 Dealer Management System">
<%BeginDetail%>
<TITLE><%ShowCarMake%> <%ShowCarModel%> Finished in <%ShowColour%> £<%ShowSellingPrice%></TITLE>
<STYLE type="text/css">
 <!--
  A:link    {text-decoration: none; color: #000000;}
  A:active  {text-decoration: none; color: #000000;}
  A:visited {text-decoration: none; color: #000000;}
  A:hover   {text-decoration: underline; color: #ccccFF;}
  BODY	  {font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 10pt; color: #000066}
 -->
  </STYLE>

<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000066;
}
body {
background-color: #FFFFFF;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #000099;
}
a:active {
text-decoration: none;
color: #FF3300;
}
-->
</style>

<BODY BGCOLOR="#FFFFFF" LINK="#FF9933" ALINK="#FF9933" VLINK="#FF9934" style="color: #000000">

<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" >
<table width="700
 " border="0" align="center" cellpadding="0" cellspacing="0">
   <tr>
  <td height="*" align="center" valign="top">

   <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr valign="top">
 <!-- InstanceBeginEditable name="EditRegion-topimage" --><!-- InstanceEndEditable -->    </tr>
   <tr valign="top">
 <td height="40" colspan="3">
  </td>
  </tr>


<TABLE WIDTH="100%"><TR><TD COLSPAN=3><P><BR><b><%ShowCarMake%> <%ShowCarModel%></b> </TD>
<TR><TD BGCOLOR="#ccccCF" WIDTH="200">
<P><B><%ShowRegYear%>  <%ShowRegLetter%></B>
<BR><%ShowColour%>
<P><%ShowMileage%> miles
<BR><%ShowDateRegistered%>
</TD>
<TD BGCOLOR="#ccccCF" WIDTH="*">
<FONT SIZE="2"><%ShowMemo%></FONT>
</td>
 <td WIDTH="20%" BGCOLOR="#ccccCF" ALIGN=CENTER>
<IMG SRC="photos/<%ShowPathLow%>" WIDTH=100 HEIGHT=70>
<BR><B>£ <%ShowSellingPrice%></B>
</TD></TR>
</TABLE>
<CENTER>
<P ALIGN="CENTER"><A HREf="Javascript:window.print();"><U>Print this page</U></A>
<P><%If1only%>
<!-- DO NOT CHANGE THE ORDER OF THESE CONDITIONAL INCLUDES - IT WILL CAUSE AN ENDLESS LOOP! Always 1only, 12, 123 or 1only, L2, L23 -->
<%FullPath%>
<%End1Only%>
<%If12%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End12%>
<%If123%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End123%>


<%If1234%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End1234%>
<%If12345%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=image5 value="<%PathToPath5%>">
<param name="link5" value="NO">
<param name="statusmsg5" value="<%ShowPhotoCaption5%>">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End12345%>
<%If123456%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=image5 value="<%PathToPath5%>">
<param name="link5" value="NO">
<param name="statusmsg5" value="<%ShowPhotoCaption5%>">
<param name=image6 value="<%PathToPath6%>">
<param name="link6" value="NO">
<param name="statusmsg6" value="">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End123456%>

<%If1234567%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=image5 value="<%PathToPath5%>">
<param name="link5" value="NO">
<param name="statusmsg5" value="<%ShowPhotoCaption5%>">
<param name=image6 value="<%PathToPath6%>">
<param name="link6" value="NO">
<param name="statusmsg6" value="">
<param name=image7 value="<%PathToPath7%>">
<param name="link7" value="NO">
<param name="statusmsg7" value="">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End1234567%>
<%If12345678%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=image5 value="<%PathToPath5%>">
<param name="link5" value="NO">
<param name="statusmsg5" value="<%ShowPhotoCaption5%>">
<param name=image6 value="<%PathToPath6%>">
<param name="link6" value="NO">
<param name="statusmsg6" value="">
<param name=image7 value="<%PathToPath7%>">
<param name="link7" value="NO">
<param name="statusmsg7" value="">
<param name=image8 value="<%PathToPath8%>">
<param name="link8" value="NO">
<param name="statusmsg8" value=" ">

<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java.
</applet>
<%End12345678%>

<%If123456789%>
<applet archive="AnFade.jar" code="AnFade.class" width=500 height=375>
<param name=credits value="Applet by Fabio Ciucci (www.anfyteam.com)">
<param name=regcode value="NO">
<param name=regnewframe value="YES">
<param name=regframename value="_blank">
<param name=res value="1">
<param name=image1 value="<%PathToPath%>">
<param name="link1" value="NO">
<param name="statusmsg1" value="<%ShowPhotoCaption%>">
<param name=image2 value="<%PathToPath2%>">
<param name="link2" value="NO">
<param name="statusmsg2" value="<%ShowPhotoCaption2%>">
<param name=image3 value="<%PathToPath3%>">
<param name="link3" value="NO">
<param name="statusmsg3" value="<%ShowPhotoCaption3%>">
<param name=image4 value="<%PathToPath4%>">
<param name="link4" value="NO">
<param name="statusmsg4" value="<%ShowPhotoCaption4%>">
<param name=image5 value="<%PathToPath5%>">
<param name="link5" value="NO">
<param name="statusmsg5" value="<%ShowPhotoCaption5%>">
<param name=image6 value="<%PathToPath6%>">
<param name="link6" value="NO">
<param name="statusmsg6" value="">
<param name=image7 value="<%PathToPath7%>">
<param name="link7" value="NO">
<param name="statusmsg7" value="">
<param name=image8 value="<%PathToPath8%>">
<param name="link8" value="NO">
<param name="statusmsg8" value=" ">
<param name=image9 value="<%PathToPath9%>">
<param name="link9" value="NO">
<param name="statusmsg9" value="">
<param name=speed value="6">
<param name=pause value="1500">
<param name=progressivefade value="YES">
<param name=overimg value="NO">
<param name=overimgX value="0">
<param name=overimgY value="0">
<param name=memdelay value="1000">
<param name=priority value="6">
<param name=MinSYNC value="2">
Sorry, your browser doesn't support Java. Please visit <a href="http://www.java.com/getjava/">http://www.java.com/getjava/</a> to download the Java software (free of charge).
</applet>
<%End123456789%>
<P>
<P><A HREF="index.html"><B>Return to the stock list.</B></FONT>
</CENTER>
<%enddetail%>  

</BODY>
</HTML>

 

Can anyone, please, see why it's not working / know what I need to do to fix it?

 

Thank you

IE9 seems to work unless I'm missing something. If I click on the car's image or description on page 1 I get page 2

post-19862-0-10298600-1349264541_thumb.jpg

post-19862-0-67216800-1349264550_thumb.jpg

  • Author

Hi Zed,

 

Yes, that's right but in the second page there's meant to be a slideshow - but all it does it shows 'Sorry, your browser doesn't support Java.'

 

The company sent me a working file, but can't send me the file that makes it work (if that makes sense) If I just copy and paste the source of the working html file, then all it will ever show is the Honda Jazz. As you'll see in the detail.txt in the previous post theres like tags(?) that call the pictures....am I talking rubbish? :(

 

Thanks

CrowboroughWebGen.html

I assume it's based on something from here that needs to have Sun Java installed? http://www.anfyteam.com/anj/index.html

 

I'd be inclined to ditch it and put in something more modern. The copyright notices on that site end at 2006!

  • Author

Thanks Zed, that's where Im stuck. I don't know how to ditch it and implement a new one - Im so stuck :(

  • Author

I have the detail.txt file as in my first post, but I dont know what to delete and what to put there instead....

ah I see, it's pulling info from their system. Did you notice that one message says "Sorry, your browser doesn't support Java. Please visit <a href="http://www.java.com/getjava/"'>http://www.java.com/getjava/">http://www.java.com/getjava/</a> to download the Java software (free of charge" Have you tried that?

 

Or know of any other client using it to see if they've done something newer. Bit of a poor show that they won't offer any support. Have you told the client as I'm sure they've paid good money for the system.

  • Author

Yes, tried updating java etc - haven't found any computer that it'll work on :( Flipping ridiculous that they won't help me.

 

They say that in the html file (that I uploaded above) has a working jave script, but I don't know how to put that into the detail.txt and make it pull info. The way they have done it, is to put in links to the Honda Jazz.....

 

The client is seriously unhappy - but they won't help

okay, applying some logic (aka guesswork) I suspect changing each <applet> section with

 

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
   "<%PathToPath1%>",
   "<%PathToPath2%>",
   "<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
 curindex=curindex==0 ? 1 : curindex-1;
} else {
 curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>

 

I think all those <%If123456789%> etc just check and display the different number of images so you will need to expand each section from the code above to have the other images. Can't guarantee it will work though I may have missed something.

  • Author

This file works: (well done Zed - thank you :) )

 

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Dragon2000">
<META NAME="GENERATOR" CONTENT="Dragon2000 Dealer Management System">
<%BeginDetail%>
<TITLE><%ShowCarMake%> <%ShowCarModel%> Finished in <%ShowColour%> £<%ShowSellingPrice%></TITLE>
<STYLE type="text/css">
<!--
A:link {text-decoration: none; color: #000000;}
A:active {text-decoration: none; color: #000000;}
A:visited {text-decoration: none; color: #000000;}
A:hover {text-decoration: underline; color: #ccccFF;}
BODY {font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 10pt; color: #000066}
-->
</STYLE>

<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000066;
}
body {
background-color: #FFFFFF;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #000099;
}
a:active {
text-decoration: none;
color: #FF3300;
}
-->
</style>

<BODY BGCOLOR="#FFFFFF" LINK="#FF9933" ALINK="#FF9933" VLINK="#FF9934" style="color: #000000">

<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" >
<table width="700
" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="*" align="center" valign="top">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<!-- InstanceBeginEditable name="EditRegion-topimage" --><!-- InstanceEndEditable --> </tr>
<tr valign="top">
<td height="40" colspan="3">
</td>
</tr>


<TABLE WIDTH="100%"><TR><TD COLSPAN=3><P><BR><b><%ShowCarMake%> <%ShowCarModel%></b> </TD>
<TR><TD BGCOLOR="#ccccCF" WIDTH="200">
<P><B><%ShowRegYear%>  <%ShowRegLetter%></B>
<BR><%ShowColour%>
<P><%ShowMileage%> miles
<BR><%ShowDateRegistered%>
</TD>
<TD BGCOLOR="#ccccCF" WIDTH="*">
<FONT SIZE="2"><%ShowMemo%></FONT>
</td>
<td WIDTH="20%" BGCOLOR="#ccccCF" ALIGN=CENTER>
<IMG SRC="photos/<%ShowPathLow%>" WIDTH=100 HEIGHT=70>
<BR><B>£ <%ShowSellingPrice%></B>
</TD></TR>
</TABLE>
<CENTER>
<P ALIGN="CENTER"><A HREf="Javascript:window.print();"><U>Print this page</U></A>
<P><%If1only%>
<!-- DO NOT CHANGE THE ORDER OF THESE CONDITIONAL INCLUDES - IT WILL CAUSE AN ENDLESS LOOP! Always 1only, 12, 123 or 1only, L2, L23 -->
<%FullPath%>
<%End1Only%>

<%If12%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12%>
<%If123%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123%>

<%If1234%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234%>
<%If12345%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345%>
<%If123456%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456%>

<%If1234567%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234567%>
<%If12345678%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345678%>

<%If123456789%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456789%>
<P>
<P><A HREF="index.html"><B>Return to the stock list.</B></FONT>
</CENTER>
<%enddetail%>

</BODY>
</HTML>

 

 

However, when I add styling (to make it look like the rest of the website) it doesn't work and comes up like this http://www.getmecarc...detailU597.html

 

This is the file for the page that doesn't work:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<%BeginDetail%>
<TITLE><%ShowCarMake%> <%ShowCarModel%> Finished in <%ShowColour%> £<%ShowSellingPrice%></TITLE>
</head>

<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" >
<table width="700
" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="*" align="center" valign="top">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<!-- InstanceBeginEditable name="EditRegion-topimage" --><!-- InstanceEndEditable --> </tr>
<tr valign="top">
<td height="40" colspan="3">
</td>
</tr>

<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/Header.jpg" width="960" height="100" /></td>
</tr>
<tr>
<td><TABLE WIDTH="100%"><TR><TD COLSPAN=3><P><BR><b><%ShowCarMake%> <%ShowCarModel%></b> </TD>
<TR><TD BGCOLOR="#ccccCF" WIDTH="200">
<P><B><%ShowRegYear%>  <%ShowRegLetter%></B>
<BR><%ShowColour%>
<P><%ShowMileage%> miles
<BR><%ShowDateRegistered%>
</TD>
<TD BGCOLOR="#ccccCF" WIDTH="*">
<FONT SIZE="2"><%ShowMemo%></FONT>
</td>
<td WIDTH="20%" BGCOLOR="#ccccCF" ALIGN=CENTER>
<IMG SRC="photos/<%ShowPathLow%>" WIDTH=100 HEIGHT=70>
<BR><B>£ <%ShowSellingPrice%></B>
</TD></TR>
</TABLE></td>
</tr>
</table>
<P ALIGN="CENTER"><A HREf="Javascript:window.print();"><U>Print this page</U></A>
<P><%If1only%>
<!-- DO NOT CHANGE THE ORDER OF THESE CONDITIONAL INCLUDES - IT WILL CAUSE AN ENDLESS LOOP! Always 1only, 12, 123 or 1only, L2, L23 -->
<%FullPath%>
<%End1Only%>

<%If12%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12%>
<%If123%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123%>

<%If1234%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234%>
<%If12345%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345%>
<%If123456%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456%>

<%If1234567%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234567%>
<%If12345678%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345678%>

<%If123456789%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456789%>
<P>
<P><A HREF="index.html"><B>Return to the stock list.</B></FONT>
</CENTER>
<%enddetail%>

</BODY>
</HTML>

 

I don't know how many hours I've spent on this, but is there something really obvious that I'm messing up?

 

Thanks

Edited by Gecko

just tried it in IE9 and that reports no styles attached. Can't see one in the code either.

 

Glad you got it working too :)

  • Author

Thanks Zed - it's you that got it working :) I just can't suss out why the photos wont show in the second version.

from the link? If you look at the source of the page that it is generated it says. It doesn't like something with all those ? ? ? ?

 

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["photos/NK52YJV.jpg",
? ? ? ? "photos/Sorry: ShowPath1 is not a valid tag!.",
? ? ? ? "photos/NK52YJV_2.jpg",
? ? ? ? "photos/NK52YJV_3.jpg"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
?img=new Image();
?img.src=randomimages[n];
?preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
?if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
? curindex=curindex==0 ? 1 : curindex-1;
?} else {
? curindex=tempindex;
?}
?document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>

  • Author

OK, I've no idea how the '????' got there :(

 

It's working now with the file below, you can see it here - http://www.getmecarcredit.net/stock/detailU597.html - but as soon as I add any styling the images won't work

 

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Dragon2000">
<META NAME="GENERATOR" CONTENT="Dragon2000 Dealer Management System">
<%BeginDetail%>
<TITLE><%ShowCarMake%> <%ShowCarModel%> Finished in <%ShowColour%> £<%ShowSellingPrice%></TITLE>
<STYLE type="text/css">
<!--
A:link {text-decoration: none; color: #000000;}
A:active {text-decoration: none; color: #000000;}
A:visited {text-decoration: none; color: #000000;}
A:hover {text-decoration: underline; color: #ccccFF;}
BODY {font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 10pt; color: #000066}
-->
</STYLE>

<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000066;
}
body {
background-color: #FFFFFF;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #000099;
}
a:active {
text-decoration: none;
color: #FF3300;
}
-->
</style>

<BODY BGCOLOR="#FFFFFF" LINK="#FF9933" ALINK="#FF9933" VLINK="#FF9934" style="color: #000000">

<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" >
<table width="700
" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="*" align="center" valign="top">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<!-- InstanceBeginEditable name="EditRegion-topimage" --><!-- InstanceEndEditable --> </tr>
<tr valign="top">
<td height="40" colspan="3">
</td>
</tr>


<TABLE WIDTH="100%"><TR><TD COLSPAN=3><P><BR><b><%ShowCarMake%> <%ShowCarModel%></b> </TD>
<TR><TD BGCOLOR="#ccccCF" WIDTH="200">
<P><B><%ShowRegYear%>  <%ShowRegLetter%></B>
<BR><%ShowColour%>
<P><%ShowMileage%> miles
<BR><%ShowDateRegistered%>
</TD>
<TD BGCOLOR="#ccccCF" WIDTH="*">
<FONT SIZE="2"><%ShowMemo%></FONT>
</td>
<td WIDTH="20%" BGCOLOR="#ccccCF" ALIGN=CENTER>
<IMG SRC="photos/<%ShowPathLow%>" WIDTH=100 HEIGHT=70>
<BR><B>£ <%ShowSellingPrice%></B>
</TD></TR>
</TABLE>
<CENTER>
<P ALIGN="CENTER"><A HREf="Javascript:window.print();"><U>Print this page</U></A>
<P><%If1only%>
<!-- DO NOT CHANGE THE ORDER OF THESE CONDITIONAL INCLUDES - IT WILL CAUSE AN ENDLESS LOOP! Always 1only, 12, 123 or 1only, L2, L23 -->
<%FullPath%>
<%End1Only%>

<%If12%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12%>
<%If123%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123%>

<%If1234%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234%>
<%If12345%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345%>
<%If123456%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456%>

<%If1234567%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234567%>
<%If12345678%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345678%>

<%If123456789%>

<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456789%>
<P>
<P><A HREF="index.html"><B>Return to the stock list.</B></FONT>
</CENTER>
<%enddetail%>

</BODY>
</HTML>

 

Any ideas?

Edited by Gecko

what style are you adding? and what doesn't work?

 

One thing to note, may not be causing a problem is that each section eg. <%If1234%> etc needs to have the correct number or images in this

[color="#000088"]var[/color][color="#000000"] randomimages[/color][color="#666600"]=[[/color][color="#008800"]"<%PathToPath%>"[/color][color="#666600"],[/color]
[color="#008800"]"<%PathToPath1%>"[/color][color="#666600"],[/color]
[color="#008800"]"<%PathToPath2%>"[/color][color="#666600"],[/color]
[color="#008800"]"<%PathToPath3%>"[/color][color="#666600"]];[/color]

statement

 

look at the original source you posted to see what they did.

  • Author

I don't understand (surprise, surprise)

 

Im using the file below and it's still not working right as you'll see here http://www.getmecarcredit.net/stock/detailU612.html

 

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Dragon2000">
<META NAME="GENERATOR" CONTENT="Dragon2000 Dealer Management System">
<%BeginDetail%>
<TITLE><%ShowCarMake%> <%ShowCarModel%> Finished in <%ShowColour%> £<%ShowSellingPrice%></TITLE>
<STYLE type="text/css">
<!--
A:link {text-decoration: none; color: #000000;}
A:active {text-decoration: none; color: #000000;}
A:visited {text-decoration: none; color: #000000;}
A:hover {text-decoration: underline; color: #ccccFF;}
BODY {font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 10pt; color: #000066}
-->
</STYLE>
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000066;
}
body {
background-color: #FFFFFF;
}
a {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #333333;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #333333;
}
a:hover {
text-decoration: none;
color: #000099;
}
a:active {
text-decoration: none;
color: #FF3300;
}
-->
</style>
<BODY BGCOLOR="#FFFFFF" LINK="#FF9933" ALINK="#FF9933" VLINK="#FF9934" style="color: #000000">
<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0" >
<table width="700
" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="*" align="center" valign="top">
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top">
<!-- InstanceBeginEditable name="EditRegion-topimage" --><!-- InstanceEndEditable --> </tr>
<tr valign="top">
<td height="40" colspan="3">
</td>
</tr>

<TABLE WIDTH="100%"><TR><TD COLSPAN=3><P><BR><b><%ShowCarMake%> <%ShowCarModel%></b> </TD>
<TR><TD BGCOLOR="#ccccCF" WIDTH="200">
<P><B><%ShowRegYear%>  <%ShowRegLetter%></B>
<BR><%ShowColour%>
<P><%ShowMileage%> miles
<BR><%ShowDateRegistered%>
</TD>
<TD BGCOLOR="#ccccCF" WIDTH="*">
<FONT SIZE="2"><%ShowMemo%></FONT>
</td>
<td WIDTH="20%" BGCOLOR="#ccccCF" ALIGN=CENTER>
<IMG SRC="photos/<%ShowPathLow%>" WIDTH=100 HEIGHT=70>
<BR><B>£ <%ShowSellingPrice%></B>
</TD></TR>
</TABLE>
<CENTER>
<P ALIGN="CENTER"><A HREf="Javascript:window.print();"><U>Print this page</U></A>
<P><%If1only%>
<!-- DO NOT CHANGE THE ORDER OF THESE CONDITIONAL INCLUDES - IT WILL CAUSE AN ENDLESS LOOP! Always 1only, 12, 123 or 1only, L2, L23 -->
<%FullPath%>
<%End1Only%>
<%If12%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12%>
<%If123%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123%>
<%If1234%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234%>
<%If12345%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345%>
<%If123456%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456%>
<%If1234567%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End1234567%>
<%If12345678%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End12345678%>
<%If123456789%>
<script language="javascript">
var delay=1000; //set delay in miliseconds
var curindex=0;
var randomimages=["<%PathToPath%>",
"<%PathToPath1%>",
"<%PathToPath2%>",
"<%PathToPath3%>"];
var preload=[],img,curindex,tempindex;
for (var n=0;n<randomimages.length;n++)
{
img=new Image();
img.src=randomimages[n];
preload.push(img);
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0 ? 1 : curindex-1;
} else {
curindex=tempindex;
}
document.images.defaultimage.src=randomimages[curindex];
}
window.setInterval(rotateimage,delay);
</script>
<%End123456789%>
<P>
<P><A HREF="index.html"><B>Return to the stock list.</B></FONT>
</CENTER>
<%enddetail%>
</BODY>
</HTML>

what I meant was say in this section

 

<%If12%>

<script language="javascript">

var delay=1000; //set delay in miliseconds

var curindex=0;

var randomimages=["<%PathToPath%>",

"<%PathToPath1%>",

"<%PathToPath2%>"];

var preload=[],img,curindex,tempindex;

for (var n=0;n<randomimages.length;n++)

{

img=new Image();

img.src=randomimages[n];

preload.push(img);

}

document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');

function rotateimage()

{

if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){

curindex=curindex==0 ? 1 : curindex-1;

} else {

curindex=tempindex;

}

document.images.defaultimage.src=randomimages[curindex];

}

window.setInterval(rotateimage,delay);

</script>

<%End12%>

 

and then in this

 

<%If123%>

 

<script language="javascript">

var delay=1000; //set delay in miliseconds

var curindex=0;

var randomimages=["<%PathToPath%>",

"<%PathToPath1%>",

"<%PathToPath2%>",

"<%PathToPath3%>"];

var preload=[],img,curindex,tempindex;

for (var n=0;n<randomimages.length;n++)

{

img=new Image();

img.src=randomimages[n];

preload.push(img);

}

document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">');

function rotateimage()

{

if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){

curindex=curindex==0 ? 1 : curindex-1;

} else {

curindex=tempindex;

}

document.images.defaultimage.src=randomimages[curindex];

}

window.setInterval(rotateimage,delay);

</script>

<%End123%>

 

so each <if... 123456789 etc needs to have the corresponding number of pathtopath's in randomimages.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.