Update list dynamically "ui-listview"

Hi, I've tried in many different ways to update dinamically a list without success. I describe schematically what I try to achieve:

---somePage html with list -----

<ul class="ui-listview">
      <a href="pagex.html">SomeDynamicContentHere</a>
     <a href="pagey.html">SomeOtherDynamicContentHere</a>


---html pagex -----

<input type="text" id="inputText">

<button type="button" onclick="update()">


---  main.js---

var someJavaObject = {text: 'someText'};

function update() {

someJavaObject.text = document.getElementById("inputText").value;



Now when going back from pagex I'd like to put that someJavaObject.text inside the anchor tag in SomePage.

I've tried manipulating the DOM, deleting the content and creating new elements but without success, when the list elements is large (more than 3 elements) it doesn't construct the widget properly.

I've tried also some other solutions like a virtuallist or create() and destroy() functions, all without a proper working solution.

Thanks for your assistance.