In my head, this seems so easy, but i cant seem to overcome it.
I have an html page which includes a checkbox.
I then have a jQuery code to display a hidden field when this box is checked.
The hidden field is populated with a value that is calculated in a python script.
This is all well and good, but instead of just the value been displayed i want a warning(text) to be shown too.
My current html checkbox code is:
<tr>
<td class="column1">Include Files:</td><td class="column2"><input type=checkbox name="getfiles" id="getfiles"></td><td><div id="hidden"></div></td>
</tr>
My current jQuery code for the hidden field is:
$('#hidden').hide();
$('#getfiles').click( function() {
if(this.checked) {
$.get('/path/to/file/', {start:$('#starttime').val(), end: $('#end').val()}, function(data) {
$('#hidden').show().text(data);
});
} else {
$('#hidden').hide();
}
});
I have tried this is the JQuery code:
($('#hidden').show().text(data).val() + ' this number of bytes will be included by adding core files');
And simply putting text within the <td> and <div>