Timeline for How to reference the id of elements in a repeat in JavaScript?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 30, 2022 at 21:17 | history | edited | Caspar Harmer | CC BY-SA 4.0 |
added 151 characters in body
|
Jun 30, 2022 at 21:04 | comment | added | Alexis | I think I found my problem, function test(){console.log('{!wrapper.product.id}');} is working. I just read somewhere that $Component was nesessary, but it's not true. Sorry for the trouble | |
Jun 30, 2022 at 19:46 | comment | added | Caspar Harmer | I've got a plan... give me a few mins | |
Jun 30, 2022 at 19:14 | comment | added | Alexis | I tried a small function for the onClick event, function test(){console.log('{!$Component.wrapper.product.id}');}. there is not error message, but nothing is printed in the console | |
Jun 30, 2022 at 18:32 | comment | added | Alexis | I dont think I can reference {!wrapper.product.id} in a javascript tho, I just get an error in my DevTools console: Uncaught SyntaxError: Invalid or unexpected token | |
Jun 30, 2022 at 17:51 | history | answered | Caspar Harmer | CC BY-SA 4.0 |