Need help with a code please

  • 1
  • Question
  • Updated 10 years ago
  • Answered
Hello, Need some help with a code need to make some images rotate, found a code on the web for it,

But...

For example if I do a 2 coloumn box and put the code on both only one works, what do I ahve to change please? I have no clue in HTML so maybe if you can highlight or Bold what i need to change please

this is the code

Photo of Patrick

Patrick

  • 89 Posts
  • 1 Reply Like
  • confused

Posted 10 years ago

  • 1
Photo of Alex

Alex

  • 3448 Posts
  • 39 Reply Likes
try copying that code on the screenshot then pasting it here then we can see the code properly because the images is kinda blurry
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
Hello Lycan,

The jamming is caused by both codes calling the same variables. One tries to do something but the the other is already doing something with it so one shuts down.

This is a known problem with some menu generators for example that people try to duplicate on the same page.

If you change the second copy code so that the word {img} is replaced with {pic} so words like {img0} become {pic0} etc., this may help.

I think that you can leave {nbImg} as it is.

(To paste this code as text the trick is to begin the code with <!-- and at the end of the code place --> I'm sorry that I can't bold your image of the text.)

I hope this may get you going but not guaranteed

Please try this out on a trial site first as this is java code and may have the effect of breaking your page or worse..
Photo of Patrick

Patrick

  • 89 Posts
  • 1 Reply Like
Hi Thanks for replying, changing img to pic didnt help, I found an other code maybe this can be edited?

<!--<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="javascript" type="text/javascript">

img2 = new Image()

seconds = "2";

function imgOne()
{
document.myimg.src = 'http://insightad.synthasite.com/resou...;
setTimeout("imgTwo()", seconds * 1000);
}
function imgTwo()
{
document.myimg.src = 'http://insightad.synthasite.com/resou...;
setTimeout("imgThree()", seconds * 1000);
}
function imgThree()
{
document.myimg.src = 'http://insightad.synthasite.com/resou...;
setTimeout("imgOne()", seconds * 1000);
}

</script>

</head>

<body onload="imgOne();">
<img src="http://insightad.synthasite.com/resou..." name="myimg">
</body>
</head-->

Thanks
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
Hi Lycan,

I think I see two problems with this code.

One is that some of the code is supposed to be placed at the head of the document. Yola users don't have access to this part of the style sheet.

The second potential problem is the recurring and shared variable names as in the first one you used.

If you can find a code that has a form name at the beginning this would most likely work as the variables then get held within a structure even though the names are the same, the heading is different. i have never seen this for other things other than menus but you may come across something.

The other work around may be to use two different types of slide shows if you can find these. Suggest for example, Picasa, Flickr, Slide, Peach. Each have their own styles and selections of slide shows. They will all appear different but that's the only thing that comes to mind.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
so the java is meant to show 3 images 1 after the other?

Here is a link to a much more advanced script - (which is easier to manipulate)
http://www.dynamicdrive.com/dynamicin...

The section it says add to head - put this high on the page in a seperate html widget === where it says body, add this where you like.

Please read it very slowly and use it first on a test page.

See it working on my site http://hexham.info/swallowship

Good Luck Lee.