PDA

View Full Version : JScript in NN 4.**


scotttyz
10-04-2002, 04:05 PM
Any experts out there on cross-platform DOM? I have never been able to get this to work in NN4.** (and all the derivitives like SGI)

It works in everything else I have found, Opera, Mozz, IE 4+, etc

<script language="JavaScript1.2" type="text/javascript">
<!-- Jpeg Rollover Note Leave base Href
var c = 0
var ImgRoll = new Array()
ImgRoll[0] = new Image
ImgRoll[0].src = 'images/rolover1/Fursys_indivi.jpg'
ImgRoll[1] = new Image
ImgRoll[1].src = 'images/rolover1/AIS_mwall.jpg'
ImgRoll[2] = new Image
ImgRoll[2].src = 'images/rolover1/Allseating_fluid.jpg'
ImgRoll[3] = new Image
ImgRoll[3].src = 'images/rolover1/Signature_trenton.jpg'
ImgRoll[4] = new Image
ImgRoll[4].src = 'images/rolover1/Tayco_cosmo.jpg'
ImgRoll[5] = new Image
ImgRoll[5].src = 'images/rolover1/Greatlakes_c10.jpg'
ImgRoll[6] = new Image
ImgRoll[6].src = 'images/rolover1/Riviera_quantum.jpg'

function animate() {
if (c > 6) c = 0
document.images['PicRoll'].src=ImgRoll[c].src;
setTimeout('animate()', 3200)
c = c + 1
}
// -->
</script>

<body onLoad="animate()">

<img name='PicRoll' src="location.jpg" width="294" height="254" border="0">

cbkihong
10-04-2002, 07:56 PM
I think in NN4.* dynamic content that changes after the page is fully loaded is only available inside layers. Elements on an HTML document are static and cannot be modified this way.

Just from my poor old memory of NN4 ...

-TheDarkEye-
10-04-2002, 08:22 PM
<script type="text/javascript">
var c = 0;
var ImgRoll = new Array();

ImgRoll[0] = new Image();
ImgRoll[0].src = 'images/rolover1/Fursys_indivi.jpg';
ImgRoll[1] = new Image();
ImgRoll[1].src = 'images/rolover1/AIS_mwall.jpg';
ImgRoll[2] = new Image();
ImgRoll[2].src = 'images/rolover1/Allseating_fluid.jpg';
ImgRoll[3] = new Image();
ImgRoll[3].src = 'images/rolover1/Signature_trenton.jpg';
ImgRoll[4] = new Image();
ImgRoll[4].src = 'images/rolover1/Tayco_cosmo.jpg';
ImgRoll[5] = new Image();
ImgRoll[5].src = 'images/rolover1/Greatlakes_c10.jpg';
ImgRoll[6] = new Image();
ImgRoll[6].src = 'images/rolover1/Riviera_quantum.jpg';

function animate()
{
if (c == 7)
{
c = 0;
}

document.images['PicRoll'].src = ImgRoll[c].src;
setTimeout('animate()', 3200);

c = c + 1;
}
</script>

i see no reason why this shouldnt work with nn4.