...

View Full Version : ASP variable with javascript



joecool2005
05-25-2006, 07:13 PM
Hi,

How do I increment the variable i inside the arrayKey(i) variable?

<script>
for(i=0; i<5;i++){
document.write("<%=arrayKey(i)%><br>");
}
</script>

thx
joe

Philip M
05-26-2006, 07:31 AM
<script>
var arrayKey = new Array();
for(i=0; i<5;i++){
arrayKey[i] = i;
alert (arrayKey[i]);
document.write("<%=arrayKey[i]%><br>");
}
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum