Make input textboxes read only

30 views
Skip to first unread message

sd...@njit.edu

unread,
Sep 16, 2014, 3:26:34 PM9/16/14
to pdfnet-w...@googlegroups.com
Hi Matt,

I want to make input textboxes (page number box, search box) read only in the viewer. I tried disabling the attr property for those two input boxes, but it is not working.

Please let me know how to achieve this.

Thanks,
Shashank

Matt Parizeau

unread,
Sep 16, 2014, 7:52:31 PM9/16/14
to pdfnet-w...@googlegroups.com
Hi Shashank,

To disable an input element from HTML you can just modify it so that it has the disabled attribute. For example:
<input id="searchBox" type="text" class="toolbar-input-text search-component" name="search" data-i18n="[title]controlbar.search" disabled/>

If you want to do it programmatically then you can have something like:
$('#searchBox').prop('disabled', true);

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages