B
Brendan
I have the following asp page in which I need to generate images
filenames from asp variables and pass these to the client side
javascript that will animate the images. The code below does not work.
How do I pass the filenames to the ajvascript. The code below does not
do it and I do not understand why.
<head>
<%
dim zulu, zone, field, depth, image_base_name, image_name(4),
zulu = Request.QueryString("zulu")
zone = Request.QueryString("zone")
field = Request.QueryString("field")
depth = Request.QueryString("depth")
if depth = "nodepth" then
image_base_name = "upload/" & zulu & "_" & zone & "_" & field & "_"
else
image_base_name = "upload/" & zulu & "_" & zone & "_" & field & "_"
& depth & "_"
end if
image_name(0) = image_base_name & "000H" & ".png"
image_name(1) = image_base_name & "012H" & ".png"
image_name(2) = image_base_name & "024H" & ".png"
image_name(3) = image_base_name & "036H" & ".png"
image_name(4) = image_base_name & "048H" & ".png"
%>
<script language="JavaScript1.2">
<!--
var ns4=document.layers?1:0
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all?1:0
var delay = 400;
var animeTimer;
var icon_dir = 'images/animation_buttons';
var lang = 'en';
var PreLoadedImages= new Array();
var TotalImage = 5;
var TabImagesComplete = new Array();
TabImagesComplete[0] = <=%image_name(0)%>;
TabImagesComplete[1] = <=%image_name(1)%>;
TabImagesComplete[2] = <=%image_name(2)%>;
TabImagesComplete[3] = <=%image_name(3)%>;
TabImagesComplete[4] = <=%image_name(4)%>;
function MM_callJS(jsStr) { //v2.0
return eval(jsStr);
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript" src="js/animateview.js" type="text/
javascript"> </script>
</head>
filenames from asp variables and pass these to the client side
javascript that will animate the images. The code below does not work.
How do I pass the filenames to the ajvascript. The code below does not
do it and I do not understand why.
<head>
<%
dim zulu, zone, field, depth, image_base_name, image_name(4),
zulu = Request.QueryString("zulu")
zone = Request.QueryString("zone")
field = Request.QueryString("field")
depth = Request.QueryString("depth")
if depth = "nodepth" then
image_base_name = "upload/" & zulu & "_" & zone & "_" & field & "_"
else
image_base_name = "upload/" & zulu & "_" & zone & "_" & field & "_"
& depth & "_"
end if
image_name(0) = image_base_name & "000H" & ".png"
image_name(1) = image_base_name & "012H" & ".png"
image_name(2) = image_base_name & "024H" & ".png"
image_name(3) = image_base_name & "036H" & ".png"
image_name(4) = image_base_name & "048H" & ".png"
%>
<script language="JavaScript1.2">
<!--
var ns4=document.layers?1:0
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all?1:0
var delay = 400;
var animeTimer;
var icon_dir = 'images/animation_buttons';
var lang = 'en';
var PreLoadedImages= new Array();
var TotalImage = 5;
var TabImagesComplete = new Array();
TabImagesComplete[0] = <=%image_name(0)%>;
TabImagesComplete[1] = <=%image_name(1)%>;
TabImagesComplete[2] = <=%image_name(2)%>;
TabImagesComplete[3] = <=%image_name(3)%>;
TabImagesComplete[4] = <=%image_name(4)%>;
function MM_callJS(jsStr) { //v2.0
return eval(jsStr);
}
//-->
</script>
<SCRIPT LANGUAGE="JavaScript" src="js/animateview.js" type="text/
javascript"> </script>
</head>