D
David
Howdy ... having trouble here
I have 3 session variables in ASP.
Session("iCount1")
Session("iCount2")
Session("iCount3")
I need to concatenate these in a javascript function.
<script type="text/javascript">
function alertIt(){
var sessionsArray = new Array();
for(var i=0;i<3;i++){
sessionsArray = eval('<%'+'=Session("iCount'+i+'")%>');
alert(sessionsArray);
}
}
</script>
Doesn't work. I've tried all kinds of syntax but am in need of some advanced
knoweledge at this point.
David
PS: This works below, a straightforward string of one of the session vars.
<script type="text/javascript">
function alertIt(){
var theSess = '<%Response.Write(Session("iCount2"))%>';
alert(theSess);
}
</script>
I have 3 session variables in ASP.
Session("iCount1")
Session("iCount2")
Session("iCount3")
I need to concatenate these in a javascript function.
<script type="text/javascript">
function alertIt(){
var sessionsArray = new Array();
for(var i=0;i<3;i++){
sessionsArray = eval('<%'+'=Session("iCount'+i+'")%>');
alert(sessionsArray);
}
}
</script>
Doesn't work. I've tried all kinds of syntax but am in need of some advanced
knoweledge at this point.
David
PS: This works below, a straightforward string of one of the session vars.
<script type="text/javascript">
function alertIt(){
var theSess = '<%Response.Write(Session("iCount2"))%>';
alert(theSess);
}
</script>