Log in

View Full Version : java slideshow



martin coombes
07-22-2009, 06:43 PM
Hi, last enquire from me,

today I downloaded a piece of java script to enable me to do a mouseon slide show. It works and I am happy with the effect that it created.

http://www.thisisharz.com/bad%20grund%20hotel%20alter%20romer.html

As you can imagine it does not work with firefox. I run it in w3c and corrected some of the errors highlighted. But the following I really do not understand. The code is,

<script type="text/javascript">


/*Rollover effect on different image script-
By JavaScript Kit (http://javascriptkit.com)
Over 200+ free scripts here!
*/

function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}

</script>
<script type="text/JavaScript1.1">

var myimages=new Array()
var gotolink="#"

function preloadimages(){
for (i=0;i<preloadimages.arguments.length; i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}


preloadimages("alter-romer-1.jpg","alter-romer-2.jpg","alter-romer-3.jpg","alter-romer-4.jpg","alter-romer-5.jpg","alter-romer-6.jpg")
</script>

W3C is saying six mistakes


Line 34, Column 42: character ";" not allowed in attribute specification list
for (i=0;i<preloadimages.arguments.length; i++){✉

Line 34, Column 42: element "preloadimages.arguments.length" undefined
for (i=0;i<preloadimages.arguments.length; i++){✉

Line 42, Column 9: end tag for "preloadimages.arguments.length" omitted, but OMITTAG NO was specified
</script>✉

Line 34, Column 41: XML Parsing Error: error parsing attribute name
for (i=0;i<preloadimages.arguments.length; i++){✉


Sorry about these and I hope that they make sense to some one,

Many thanks

Martin

X96 Web Design
07-22-2009, 07:48 PM
What do you mean "as you can imagine, it doesn't work in Firefox"? Is that because of JavaScript kit, or are you saying that IE's better?

Plus, this thread should be in the JavaScript" section.

// X96 \\

martin coombes
07-23-2009, 06:07 AM
Hi, you are correct I should of post this on the java script page. Will do that later to see the response. As far as Firefox goes I like it, and since our last time together on this thread I use it all the time. The only problem I have is that the software I use to do the web site only opens up in IE. So I work on the page keep reviewing it, than download and check it on Firefox. That is when the fraustion comes in. I then run the page in w3c to fix errors, and until yesterday I have had no problems. On my side I know I need new software, but I need a new computer first.
As said will post the orginal thread on the java page, but would appreciate if you could give me some advice on the graduated background.