I keep on getting a syntax error in this HTML/JavaScript code and I can’t seem to figure out why.
Any ideas?
<li onClick="document.getElementById(\'attribute83\').selectedIndex ="2", spConfig.configureElement($("attribute83")); class="some-css-class"><a href="http://www.example.com">Something</a></li>'
Because your onClick handler has a syntax error.
The web browser will take everything between the two quote on your onClick handler
which means
This isn’t valid javascript. If you’re using onclick handlers you can have the quotes used to enclose your html attribute (“) in your javascript.