no_hh
04-21-2004, 10:10 AM
Hi all!
I have a script which work fine in Internet Explorer but don't work in Netscape Navigator (I have NN4.7).
This script display some images (e.g. : 1.jpg and 2.jpg) , but in NN it does't display anything. Please give me any ideea !
Thks!
--
<html>
<head>
<script type="text/javascript">
var photos=new Array()
var which=0
photos[0]="1.jpg"
photos[1]="2.jpg"
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}
function keeptrack(){
window.status="Imaginea "+(which+1)+" din "+photos.length
}
function backward(){
if (which>0){
which--
document.images.photoslider.src=photos[which]
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
keeptrack()
}
}
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><p align="left"><a href="#" onClick="backward();return false">Previous</a></td>
<td ><p align="right"><a href="#" onClick="forward();return false">Next</a></td>
</tr>
<tr>
<td width="100%" colspan="2" height="22"><center>
<script>
document.write('<img src="'+photos[0]+'" name="photoslider" border=0>')
</script>
</td>
</tr>
</table>
</body>
-------------
I have a script which work fine in Internet Explorer but don't work in Netscape Navigator (I have NN4.7).
This script display some images (e.g. : 1.jpg and 2.jpg) , but in NN it does't display anything. Please give me any ideea !
Thks!
--
<html>
<head>
<script type="text/javascript">
var photos=new Array()
var which=0
photos[0]="1.jpg"
photos[1]="2.jpg"
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}
function keeptrack(){
window.status="Imaginea "+(which+1)+" din "+photos.length
}
function backward(){
if (which>0){
which--
document.images.photoslider.src=photos[which]
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
document.images.photoslider.src=photos[which]
keeptrack()
}
}
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><p align="left"><a href="#" onClick="backward();return false">Previous</a></td>
<td ><p align="right"><a href="#" onClick="forward();return false">Next</a></td>
</tr>
<tr>
<td width="100%" colspan="2" height="22"><center>
<script>
document.write('<img src="'+photos[0]+'" name="photoslider" border=0>')
</script>
</td>
</tr>
</table>
</body>
-------------