dutchydevvy Posted June 1, 2006 Share Posted June 1, 2006 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 More sharing options...
dutchydevvy Posted June 1, 2006 Author Share Posted June 1, 2006 I've nailed the problem of the loop; when I comment out the crop-function, the code works flawlessly.Which is irrational, because I replace the string AFTER I call the function. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now