I created a component dynamically and I added the tag script to it but the code inside doesn't work I tried a lot of solutions but none of them work for me, please check the code
Asked
Active
Viewed 81 times
-2
-
Does this answer your question? [Can scripts be inserted with innerHTML?](https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml) – CherryDT Jul 13 '20 at 17:56
-
No mate, if you checked the commented code you gonna see what I tried – SimOn TIBAS Jul 13 '20 at 17:57
1 Answers
0
I used jQuery document.ready and it's working now fine for me after injecting it with a dynamic component
$(document).ready(function(){
$("#prep_abs_rup_eval").change(function(){
if($("#prep_abs_rup_eval").val()=='A'){
$("#prep_abs_rup_score").val("20");
} else {
$("#prep_abs_rup_score").val("10");
}
});
});

SimOn TIBAS
- 5
- 5