My requirement is to have an infinite loop where after each click i should get next element.And after the last element i should get the first element.
Code:
<script language="JavaScript">
function ChangeAll(f,buton,frm)
{
var mySplitResult=f.split(",");
for(i = 0; i < mySplitResult.length; i++)
{
if(buton == mySplitResult[i])
{
i++;
{
frm.value = mySplitResult[i];
if(i<mySplitResult-1)
{
i=0;
}
}
}
</script>
<%
DIM Definition(4)
Dim d
d="S,F,G,T"
response.write("<form method='post'>")
response.write("<input type='button' value='S' onClick='ChangeAll("""&d&""",this.value,this)' ")
response.write("</form>")
%>
This is giving me an exception...can anyone help???..
