Side navigation
#7410 closed bug (duplicate)
Opened November 05, 2010 09:08AM UTC
Closed March 30, 2011 07:32PM UTC
Last modified March 30, 2011 07:32PM UTC
cannot change input value in a variable
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | attributes | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a variable: var jObj;
Trying to change value with:
$('input[name=something]', jObj).val('12345');
I can read back the right value:
alert( $('[name=retry]', jObj).val() );
BUT
alert( $('<p />').append(jObj).html() ) shows <input name="something" value="" />
Note: I can modify all attriubte of input except value!!
I've created a jsFiddle to show this test case http://jsfiddle.net/boushley/KWBQB/ There is some interesting behavior happening with manipulating the value in memory vs what happens when it's added to the dom or another element.