View Full Version : Cut and Paste OnMouseover Slideshow
loveprine
08-29-2002, 03:32 AM
I am trying to use the cut and paste OnMouseover Slideshow that is featured at the JavascriptKit.com. I'm getting a line error code which reads "Line:81 Error: Expected ';'
I have tried everything I can think of to eliminate this error...seems I know just enough to be dangerous, not enough to debug.
Can someone please help me? Or at least tell me if there's someplace specific in between the script tags or elsewhere that I need to look?
Killing me in Kentucky,
Pam
glenngv
08-29-2002, 04:41 AM
how can we help if we can't see the code?
loveprine
08-29-2002, 05:54 AM
<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="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("images/alphaspring.jpg","images/alphaswamp.jpg","images/alphawinter.jpg","images/bucklake.jpg","images/endofdays.jpg","images/shade.jpg")
</script>
--------------------------------------
<script>
//myimages[0] would refer to "images/blank.jpg", myimages[1] would refer to "images/alphaspring.jpg",
myimages[2] would refer to "images/alphaswamp.jpg", myimages[3] would refer to "images/alphawinter.jpg.jpg",
myimages[4] would refer to "images/bucklake.jpg", myimages[5] would refer to "images/endofdays.jpg",
myimages[6] would refer to "images/shade.jpg",
</script>
------------------------------------
<a href="javascript:warp()"><img src="images/blank.jpg" name="targetimage" border=0 width="445" height="401"></a></p></td>
glenngv
08-29-2002, 06:06 AM
why do you have this?
is it supposed to be just a comment?
is it in a single line (without linefeeds)?
if it has linefeeds, then you should put // at every line or put the whole thing in between /*<comments here> */
<script>
//myimages[0] would refer to "images/blank.jpg", myimages[1] would refer to "images/alphaspring.jpg",
myimages[2] would refer to "images/alphaswamp.jpg", myimages[3] would refer to "images/alphawinter.jpg.jpg",
myimages[4] would refer to "images/bucklake.jpg", myimages[5] would refer to "images/endofdays.jpg",
myimages[6] would refer to "images/shade.jpg",
</script>
boxer_1
08-29-2002, 06:36 AM
loveprine,
Where did you aquire this script? Was it from here:
http://www.javascriptkit.com/script/script2/rolldifferent.shtml
The Code:
<script>
/*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 language="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("plane1.gif","plane2.gif","plane3.gif","plane4.gif","plane5.gif")
</script>
Aside from some modifications the biggest difference I noticed between the code you posted and the script I linked to and posted is the absence of the credits. If you got the script from http://www.javascriptkit.com/script/script2/rolldifferent.shtml (not saying you did) please replace the credits if you wish to receive further assistance.
If you got it from another source, please post the link to where you got the script you posted from ;).
loveprine
08-30-2002, 03:41 AM
Hey Boxerman,
Yes, that's exactly where it came from...I thought I had explained that in the subject line of my post. I wasn't trying to "steal" any script, I was just saving space on the post. No harm no foul? Anyway, the credits are on place on the web I'm building.
Can you give me any assistance with this problem? If you would like to see it in action (the error message) the web address is http://www.members.aol.com/pamspiano/still-life.htm
Any guidance you can give will sure save me a 19th nervous breakdown ;)
Thanks, have a great evening!
Pam
melihturan
10-07-2009, 07:10 PM
<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="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("images/alphaspring.jpg","images/alphaswamp.jpg","images/alphawinter.jpg","images/bucklake.jpg","images/endofdays.jpg","images/shade.jpg")
</script>
--------------------------------------
<script>
//myimages[0] would refer to "images/blank.jpg", myimages[1] would refer to "images/alphaspring.jpg",
myimages[2] would refer to "images/alphaswamp.jpg", myimages[3] would refer to "images/alphawinter.jpg.jpg",
myimages[4] would refer to "images/bucklake.jpg", myimages[5] would refer to "images/endofdays.jpg",
myimages[6] would refer to "images/shade.jpg",
</script>
------------------------------------
<a href="javascript:warp()"><img src="images/blank.jpg" name="targetimage" border=0 width="445" height="401"></a></p></td>
when i come on a link, picture and text of picture changes
how do i do this?
please help me
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.