To create a jQuery Mobile text input style, you use .textinput() and to update the presentation of jQuery Mobile's existing text input, you use .textinput("refresh") . Therefore, for subsequent calls, you need to use the .textinput("refresh") method, and for non-initialized text input, you need to use .textinput() .
Sort of:
$('#editPartyName').val(party.name).textinput('refresh');
My experience with selectable inputs, but I believe that it is the same for text inputs, is what I do to select to update the view:
$("select#foo").selectmenu("refresh");
This example is from the docs: http://jquerymobile.com/demos/1.0b1/docs/forms/forms-selects.html (bottom of page)
Update
You do not need to do anything except change the value of the input element:
$('#editPartyName').val(party.name)
Here is a demo version of jQuery Mobile 1.1.0: http://jsfiddle.net/VbAKL/
And here is a demo using jQuery Mobile 1.0B1: http://jsfiddle.net/VbAKL/1/
There is a good chance that this problem is created because you select by identifier, and there can be several identifier instances in the DOM at the same time. jQuery Mobile sites can have several pseudo-pages in the DOM at a time, and if you have an element on each page with the identifier #header , then when you try to make a selection for #header only the first instance will be returned. Thus, your function call $('...').val(...) may work, but not on the right element.
Short answer: make sure your identifiers are unique on all pages of your site when using jQuery Mobile.
source share