Set the value of textbox and hidden fields are both not working
hi guys
this simple script is not working.
Please help
Everything works except lines 17 and 18 (even the alert works)
html elements are
<input type="hidden" name="cropx" id="cropx" value="0" />
<input id="Text1" type="text" value="" />
I have also tried replacing html with val e.g
$('#cropx').val(c.x);
thank you
- $(document).ready(function ($) {
-
- $('#Image1').Jcrop({
-
- bgColor: 'red',
- onSelect: function (c) {
- $("#ehi").click(function () { //This is just a button ID
- alert(c.x)
- });
- bgColor: 'red'
- console.log(c.x);
- console.log(c.y);
- console.log(c.w);
- console.log(c.h);
- $('#cropx').html(c.x);
- $('Text1').html('I am tired');
- alert("Back of the net: Job done - " + c.x);