I have following div with a textbox in it.
<div id="DvPrint">
<div>
<input type="text" style="width: 100px;
margin-left: 25px;" class="textbox" id="ctl00_content_TxtLetterNumber" readonly="readonly" name="ctl00$content$TxtLetterNumber">
</div>
</div>
Now I write the div contents in a new window using window.open.
n = window.open('M80Print.aspx', '_blank', 'status=no,toolbar=no,menubar=yes,height=550px,width=640px');
n.document.open();
n.document.write($('#DvPrint').html());
Now I want to change the textbox value in new opened window. How can I do it??
Something like this:
n.document.getElementById('ctl00_content_TxtLetterNumber').innerHTML = "1";
but it doesn’t work.
Changing textbox value is being done with
value, not withinnerHTML.jQuery: