I've noticed that you can set javascript variables using ASP code. For example:
var test = "<%response.write(number)%>"
I was wondering if other types of ASP code can work in javascript, such as if statements or while loops. For Example:
function test1()
{
count = 0;
<%if number = 1 then%>
count = count + 1;
<%end if%>
}
function test2()
{
count = 0;
<%index = 0
do while index < 10 %>
count = count +1;
<%index = index +1
loop%>
}
I am relatively new to web development and programming so I'm not sure if this is possible. If this does not work, is there any way I can get around this or a different way to code it?
Any tips or advice would be greatly appreciated.
client-sideprocessing andserver-sideprocessing... they achieve two quite different things