views:

39

answers:

0

Trying to load some data from mysql into the next screen using jQtouch. What is the correct way of doing this. Right now I just have a jquery click event on the tag for the next page which really is just a div on the same page. The jquery looks like this.

$.post("/mobile/getCities", {}, function(data){ loadURL($(this).attr('href'), "#findyourhome"); });

this call hits a controller and pulls the data. Once I have the data I am setting it to a view-variable inside the controller. I think the issue was the fact that the index function gets hit again this way so the view variable never properly gets set.