Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Change event in repeating sections not triggering

1732994948
Quinn
Pro
Sheet Author
I'm sure I'm doing something silly wrong here, but changing a value in a repeating section isn't triggering the change event. HTML: <fieldset class="repeating_skills"> <div class="skill"> <div class="skill-upper"> <select class="skill-picker" name="attr_skillname" selected="customSkill"> Event catcher: on('change:repeating_skills:skillname', function(eventInfo) { var skillId = eventInfo.sourceAttribute.substring(17, 37); log(eventInfo); log(skillId); Logs aren't posting, so it's not being hit. What am I missing?
1733001291
GiGs
Pro
Sheet Author
API Scripter
Does your select work properly? That selected tag shouldnt be there. I would change the sheet worker to show if the event is firing, something like on('change:repeating_skills:skillname', function(eventInfo) { console.log('triggered'); }); also do you have a function called log? I don't think on its own that will do anything.
1733001869
Quinn
Pro
Sheet Author
You can use log in place of console.log in character sheets. I tried removing some lines, which led to the logs showing up... then I added the old lines back exactly as-is, and now it works correctly, so I don't know what to do with this thread now.
1733003334
GiGs
Pro
Sheet Author
API Scripter
Quinn said: You can use log in place of console.log in character sheets. Wow, I did not know that about log (though I tend to use console.info more often).
1733104596

Edited 1733104653
GiGs
Pro
Sheet Author
API Scripter
Quinn said: I tried removing some lines, which led to the logs showing up... then I added the old lines back exactly as-is, and now it works correctly, so I don't know what to do with this thread now. Have you used that character sheet a lot for testing? It's possible it has acquired some corruption. Whatever the case, I would not be comfortable cotinuing to use that character - I'd create a new one and use that from now on. If youre not in the sheet sandbox, its very likely to be safe to ignore this comment.