Good Day:
I'm working with an image changing javascript that allows you to click on an image to open a URL.
The problem I'm having is that when I click on the image, it opens the said URL in a new window. I want it to open in the parent window.
Here is my inline javascript in the head tags:
<script language="JavaScript1.1">
<!--
var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}
function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}
function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}
//-->
</script>
And here is my javascript in the body tags:
<script>
//configure the paths of the images, plus corresponding target links if you want
slideshowimages("image1.png","image2.png","image3.png","image4.png")
slideshowlinks("page1.php","page2.php","page3.php","page4.php")
//configure the speed of the slideshow, in miliseconds
var slideshowspeed=4000
var whichlink=0
var whichimage=0
function slideit(){
if (!document.images)
return
document.images.slide.src=slideimages[whichimage].src
whichlink=whichimage
if (whichimage<slideimages.length-1)
whichimage++
else
whichimage=0
setTimeout("slideit()",slideshowspeed)
}
slideit()
</script>
I've already tried various things related to adding name as a var, setting it to _parent, inserting a new function to get name, etc...
All to no avail.
Any help would be greatly appreciated.
Best Regards,
dennishall