[pls help] Javascript: i set input in maskmoney (money format) and readonly, but still the textbox can still be edited | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[pls help] Javascript: i set input in maskmoney (money format) and readonly, but still the textbox can still be edited

Hi. So i set a texbox in 2 javascript function, maskmoney and readonly. The purpose is, when user click yes in a radio button, it will make this textbox to bein readonly. While if uder click no, the textbox can be inserted. And the input should be in maskmoney (money format) My issue is, even when i click radio button to yes (input should be in readonly), the input still can be edited. Can anyonw help me? https://code.sololearn.com/Whl9KuL72IhV/?ref=app

8th Dec 2021, 4:17 AM
Azfar Hafiz Ahmad
Azfar Hafiz Ahmad - avatar
5 Answers
0
Always mention your code along with your question.
8th Dec 2021, 4:56 AM
zexu knub
zexu knub - avatar
0
zexu knub hi i have attached the code in the question, hope u can take a look
8th Dec 2021, 7:35 AM
Azfar Hafiz Ahmad
Azfar Hafiz Ahmad - avatar
0
Azfar Hafiz Ahmad Is it 100% your code? cuz you have used JS & jQuery mixed in the code & you haven't even defined the jQuery CDN.
8th Dec 2021, 7:43 AM
zexu knub
zexu knub - avatar
0
zexu knub this is the only related code. That line of html (textbox) and the javascript. maskmo maskmoney
8th Dec 2021, 7:51 AM
Azfar Hafiz Ahmad
Azfar Hafiz Ahmad - avatar
0
zexu knub i've read in google, maskmoney and readonly cant be bind as it will cause readonly not working. But i need it, so thats the issue
8th Dec 2021, 7:52 AM
Azfar Hafiz Ahmad
Azfar Hafiz Ahmad - avatar