I have this code within an asp page that will not work if the scripting object model is turned on for the page. I need it turned on to use dtc's but I also need it turned off to do this javascript:
<script language="JavaScript1.1">
<!--
var image1=new Image()
image1.src="13-5-1.jpg"
var image2=new Image()
image2.src="13-5-2.jpg"
var image3=new Image()
image3.src="13-5-3.jpg"
//-->
</script>
<TITLE></TITLE>
</HEAD>
<BODY onLoad="slideit()">
<img src="13-5-1.jpg" WIDTH=225 HEIGHT=225 name="slider" border=0 style="filter:blendTrans(duration=3)">
<script>
<!--
////change number of images below
var number_of_images=3
//change speed below (in seconds)
var speed=3
var step=1
var whichimage=1
function slideit()
{
if (!document.images)
return
if (document.all)
slider.filters.blendTrans.apply()
document.images.slider.src=eval("image"+step+".src"
if (document.all)
slider.filters.blendTrans.play()
whichimage=step
if (step<number_of_images)
step++
else
step=1
if (document.all)
setTimeout("slideit()",speed*1000+3000)
else
setTimeout("slideit()",speed*1000)
}
//-->
</script>
I name my image slider and when I go to do something like this: slider.filters.blendTrans.apply() <see code above for line I got this from>
I get an error that says 'slider' is undefined
how can I use this javascript without turning off Scripting Object Model
<script language="JavaScript1.1">
<!--
var image1=new Image()
image1.src="13-5-1.jpg"
var image2=new Image()
image2.src="13-5-2.jpg"
var image3=new Image()
image3.src="13-5-3.jpg"
//-->
</script>
<TITLE></TITLE>
</HEAD>
<BODY onLoad="slideit()">
<img src="13-5-1.jpg" WIDTH=225 HEIGHT=225 name="slider" border=0 style="filter:blendTrans(duration=3)">
<script>
<!--
////change number of images below
var number_of_images=3
//change speed below (in seconds)
var speed=3
var step=1
var whichimage=1
function slideit()
{
if (!document.images)
return
if (document.all)
slider.filters.blendTrans.apply()
document.images.slider.src=eval("image"+step+".src"
if (document.all)
slider.filters.blendTrans.play()
whichimage=step
if (step<number_of_images)
step++
else
step=1
if (document.all)
setTimeout("slideit()",speed*1000+3000)
else
setTimeout("slideit()",speed*1000)
}
//-->
</script>
I name my image slider and when I go to do something like this: slider.filters.blendTrans.apply() <see code above for line I got this from>
I get an error that says 'slider' is undefined
how can I use this javascript without turning off Scripting Object Model