Jump to content

Stuck in a loop


dutchydevvy

Recommended Posts

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?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...