title: jquery-mobile: Can't change input value in dialog
body: <p>I'm having trouble dinamicaly setting the value of textboxes on a dialog opened by a listview item with JQueryMobile.</p>
  
  <p>I can change the value, verified by alert before and after, but the value displayed doesn't change.</p>
  
  <p>The concept is a listview displaying the items of a shopping list.
  If the user clicks one of the items a dialog should be displayed with a form for editing the product information.</p>
  
  <p>I started by setting the href to the dialog page, and binding to the onclick event. 
  The problem was that the event ran before the page loaded so no items where available.</p>
  
  <p>Next I opened the dialog programaticaly on the "onclick" event.</p>
  
  <p>I can change the value, but the change isn't displayed.</p>
  
  <p>Relevant Snippets are bellow.</p>
  
  <p>Thanks in advance for any help.</p>
  
  <p>Best Regards</p>
  
  <p>Joao</p>
  
  <pre><code>&lt;ul data-role="listview" data-inset="true" data-split-theme="b" data-split-icon="star" id="shopping_list_listview" style="margin-bottom:0px"&gt; 
  &lt;li&gt;
       &lt;a data-rel="dialog" data-transition="pop" href="#" onClick="loadData($(this))"&gt;
          &lt;span class="product_name truncate" SAMPLE product&lt;/span&gt;
       &lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p></p>
  
  <p></p>
  
  <pre><code>function loadData(obj)
          {
  
            $.mobile.changePage('product_dialog.html','pop',false,true) 
  
            var name = obj.find("span.product_name").text();
  
            alert ($("#popup-product-name").val());
  
            $("#popup-product-name").val(name);
  
            alert ($("#popup-product-name").val());
  
          }
  </code></pre>
  
  <p></p>