How to set value to asp:textbox, added to the form as HTML?
Posted by Дмитрий Фоломеев - Nov 26 ’14 at 11:16
How to set value to asp:textbox (not sharepoint field), added to the form as HTML?
For example, I added asp:TextBox (as HTML) to form:
<asp:TextBox runat="server" id="TextBox100" ></asp:TextBox>
I want to set the field value, and do other changes using javascript:
fd.field('TextBox100').value('100');- not work
document.getElementById('TextBox100').value= "100"; - not work
please help.
-
Dmitry KozlovAdminMember for: 8 years 7 months 25 days
Hi Dmitry,
You can assign a CSS class to the textbox:
<asp:TextBox runat="server" id="TextBox100" CssClass="my-textbox" ></asp:TextBox>
And use it in your JS-code following way:
$('.my-textbox').val()
-
Дмитрий ФоломеевMemberMember for: 7 years 5 months 19 days
[#1]:
Thank you, it works!
Displaying 1 to 2 of 2 messages