Build Gallery JavaScript Problem

Ask for help about FlashGot, no registration needed to post
Post Reply
thisguy

Build Gallery JavaScript Problem

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
User avatar
Giorgio Maone
Site Admin
Posts: 9528
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Build Gallery JavaScript Problem

Post 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.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Post Reply