Take a look at this code:
do while instr(LCase(elementString),LCase("/images/pagepictures/"&sPageTitle&"/egami/"))>0response.write(instr(LCase(elementString),LCase("/images/pagepictures/"&sPageTitle&"/egami/"))) sFileName=mid(LCase(elementString),instr(LCase(elementString),LCase("/images/pagepictures/"&sPageTitle&"/egami/")))sFileName=left(sFileName,instr(sFileName,"""")-1)sFileName=right(sFileName,Len(sFileName)-instrRev(sFileName,"/"))call crop(sFileName) elementString=Replace(LCase(elementString),LCase("/images/pagepictures/"&sPageTitle&"/egami/"),"/images/pagepictures/"&sPageTitle&"/200/",1,1)response.write(instr(LCase(elementString),LCase("/images/pagepictures/"&sPageTitle&"/egami/")))response.Flush()loop
When I run this code, I get stuck in an infinite loop, and the response.writes return 905 and 0 accordingly, over and over again.What I'm curious about is why the variable elementString is reset to it's original value at the end of the loop.Any ideas?