Hi, I haven't done much javascript in the past so this is probably
something really simple.  Here is a snippet of the code I am working
with:

---------------------

var myProjects = [
        "projectA",
        "projectB"
];
for(i = 0; i < myProjects.length; i++) {
        // ADD PREVIOUS BUTTON
        vPrevButton = Builder.node('div',{className:'carousel_prev_btn',
onclick:'fLoadPrevProjectScreen(myProjects[i])'});
        $("carousel_" + myProjects[i]).appendChild(vPrevButton);
}

---------------------

My problem is that I want the onclick function to process
myProjects[i] BEFORE it's appended to the HTML element.  So for the
first loop, the onclick event would be
'fLoadPrevProjectScreen("projectA")'. Thanks in advance for your help
on my dumb question.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to