Tuesday, April 12, 2011

Setting up Ajax in your iPhone or Android app

In order to get Ajax to work, you will need CSS believe it or not. You need to create an id container where the info is going to get pulled into. For instance, add the following:

<CSS type="text/css" media="mobile">
#container   {
width:whatever pixels;
float:left or right;
}
</css>
Now reference, your php file from your link like this:
<a href="javascript:void();" onclick="funtionname("phpfile name",1,'container');">link</a>

Check out this WWII iPhone trivia game in iTunes App Store- Codename: Trivia WW2

No comments:

Post a Comment