Page 1 of 1

Build Gallery JavaScript Problem

Posted: Tue Jun 01, 2010 4:42 am
by thisguy
Hello, I am a new user to FlashGot. It seems like a very powerful tool, especially with its function to build galleries based on JavaScript functions. However, when I tried to implement a function to download some files, the function did not perform as expected, even though I am sure the code could not be more correct. Is there something I am doing wrong?

Code: Select all

for(var i = 0; i < arguments.length; i++)
{
   var counter = i + 13;
   if(counter < 100)
   {
      return (arguments[i] + "/0" + counter + ".jpg"); 
   }
   else
   {
      return (arguments[i] + "/" + counter + ".jpg"); 
   }
}
The problem is that the counter does not increment. All outputs from FlashGot end with 13.jpg instead of 13.jpg, 14.jpg, etc.

Re: Build Gallery JavaScript Problem

Posted: Tue Jun 01, 2010 9:53 am
by Giorgio Maone
Can I see also the pattern you put in the two input boxes?
It should be something like

Code: Select all

http://some.site.com/images/[myfuction([0-200])]
In other words, the increment is done by the pattern itself ([0-200]) and your function gets called once for each increment.