What version of iUI are you using? Do you have a simplified demonstration (or the full app) available somewhere I can look at it?

-- Sean


On 11/18/13 12:17 PM, Wayne Bennett wrote:
I have built a simple iui webapp which gets data from a mysql db via ajax which 
all works the way it should. I want to refresh the data via a script and so 
need to reload the new ajax data and replace the current page fragment with the 
new data.
  I have tried this:

function refreshCurrentPage() {
MyAjax = iui.ajax("MyAjaxFile.php",null,null,success);
}


function success(Ajax){
     if (Ajax.readyState == 4){
         $('#CurrentPage').replaceWith(Ajax.responseText);
     }
}

That sort of works except that the selected attribute of the newly loaded 
fragment doesn't exist so I get a blank page. If I set it in my success script, 
voilla, my content appears. The only problem then is that the iui navigation 
gets screwed up. If I click the back button, I end up with two page fragments 
with selected set to true and the href links which worked previously, so longer 
work.

I'm sure there is an easy way to do this and I've probably overlooked it in the 
documentation but I would appreciate any help you could manage.

Thanks


--
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to iphonewebdev+unsubscr...@googlegroups.com.
To post to this group, send email to iphonewebdev@googlegroups.com.
Visit this group at http://groups.google.com/group/iphonewebdev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to