Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Trying to set the onClick attribute of an element inside a for loop. Reply To: Trying to set the onClick attribute of an element inside a for loop.

#236054
Shikkediel
Participant

I think that happens because all of the script is wrapped in an anonymous (function() {}), making the scope so that the inner can’t be reached with inline scripting.