Cant use onclick on html5 page, need help using listener and IDs as alternative of onclick for HTML5
Budget: $10 – $30 USD
I have a html page with javascript that loads a calculator (it works well on Drupal 7) in the html body
https://digexart.com/tests/estates/index.html
but it does not work on Drupal 9 because of event rules.
.
I would like to remove items like onclick, onkeypress, onkeyup and others because they are no longer allowed in the HTML body area in Drupal 8/9. https://www.drupal8.ovh/en/tutoriels/366/javascript-events-drupal-8
Are you able to call on the button and input via their IDs instead, and then implement the listener and other pieces on the JS side?
The three IDs I made are:
1id="estate-calculator__input"
2id="estate-calculator__button"
3id="estate-calculator__results"
See 'calculator.html' attached.
https://digexart.com/tests/estates/index.html
but it does not work on Drupal 9 because of event rules.
.
I would like to remove items like onclick, onkeypress, onkeyup and others because they are no longer allowed in the HTML body area in Drupal 8/9. https://www.drupal8.ovh/en/tutoriels/366/javascript-events-drupal-8
Are you able to call on the button and input via their IDs instead, and then implement the listener and other pieces on the JS side?
The three IDs I made are:
1id="estate-calculator__input"
2id="estate-calculator__button"
3id="estate-calculator__results"
See 'calculator.html' attached.