Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 817 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Immediate Javascript Help Needed

Thread title: Immediate Javascript Help Needed
Closed Thread    
    Thread tools Search this thread Display Modes  
07-11-2006, 05:28 PM
#1
170Designs is offline 170Designs
Status: Junior Member
Join date: Jan 2005
Location:
Expertise:
Software:
 
Posts: 42
iTrader: 0 / 0%
 

170Designs is on a distinguished road

  Old  Immediate Javascript Help Needed

I have this script where I upload many images at once then I can rotate them individually through a Javascript script. The Javascript rotation works perfectly with few images but messes up with a lot of images. When there are a lot of images uploaded at once, if I click to rotate one of the images, it actually rotates another image. I ran this by someone else and he said "that's probably because the array containing the image names is out of order."

My site is http://www.gigmax.com. If you want to see the problem yourself, just login as username account2 and password account2 and go to the Create Album tab in the My Gigmax section. After you do that, go ahead and select like 20+ images (of any size) then Upload them. Once you do that, you will see what I mean on the next screen when you try to rotate them.

Here is the code:
Code:
function step_2_rotate(o_src)
{
    var i_event_row;
    if (o_src.id.match(/(\d+)$/)) {        
        i_event_row = Number(RegExp.$1);
        var i_angle = o_src.id.indexOf('left') >= 0 ? 3 : 1;
        
        var row_this = -1;
        for (i = 0; i < o_files_data.length && (row_this < 0); i++) {
            if (o_files_data[i].index == i_event_row) {
                o_files_data[i].angle = (Number(o_files_data[i].angle) + i_angle) % 4;
                row_this = i;
            }               
        }        
        step_2_draw_table();        
    }
}
Thanks,
Matt

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed