تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1881 أدوات العرض

I want to make the field to be read only or not by a button, however instead of using XML, I would like to make it run by Javascritpt.

Can it be possible ?

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Sorry, i dont have enough Karma to comment.

Thx, let me follow you way.

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

It is possible to make the field read-only through Javascript. It can be done as follows

document.getElementById('field_id').setAttribute('readonly', true);

In these cases, we have to use the setAttribute method. Here, with the help of the field's id, we can set the readonly as true. We have to replace the field_id with our corresponding id.

Regards

الصورة الرمزية
إهمال