Page 1 of 1

Setting dropdown to readonly

Posted: Wed Aug 30, 2017 7:43 pm
by cheemingyong

hi how do i set dropdowns to readonly in the generated form ?
as in dynamically. is there any pre-made function or using jquery ?

i am only aware i can do this to input text boxes using

try { $('#x_tmpsellRate').prop('readonly', true); } catch (err) { }
try { $('#x_tmpdAmount').attr('readonly', true); } catch (err) { }

i am really out of ideas for select dropdown though


Re: Setting dropdown to readonly

Posted: Wed Aug 30, 2017 9:00 pm
by cheemingyong

ok i figured that out ...

#x_TranType').prop('disabled', false);} catch (err) {}
try { $('#x_TranType').prop('disabled', 'disabled');} catch (err) {}