I am feeling really stupid and not sure if doing something really dumb what... so excuse me in advance.
I have the following HTML:
<input type=text value=0 name=pcscubes id=pcscubes>
I have the below jquery syntax:
var cubes=123.2;
$(#pcscubes1).val(cubes);
var test=$(#pcscubes1).val();
alert(test);
When the jquery executes, the input box will display 123.2 and the alert will be 123.2.
if you inspect the html object though, the value is still 0?
so the display of the input is different from what the real value is. so when I submit this form it posts 0 rather than 123.2
Now I have built a whole web app with this syntax and works perfectly. today it just stops working? I have restarted browser, checked old code that was working, logged off and on and still it does the same.
web app obviously has jquery loaded and jquery ui on this form.
using codeigniter?
any ideas as I am banging my head over something so stupid....
Out of interest I created the below fiddle and it is doing the same?
http://jsfiddle.net/49nqU/
why is the value 0 when it is showing 123.2?
Thanks as always,