If you do not have TapLynx and want to see the files that I'm using you can navigate to the html form from this link and you can grab the .php file that processes the POST from this link (form_process.php). The initial form will take two text fields as input and the .php processing form will echo the values of those fields back to the user.
An interesting thing to note as you design your pages, TapLynx uses a custom web controller so you cannot take advantage of the mobile Safari controls. You will need to give the person a way to get back to the launching page or else TapLynx will get stuck.
As with many things in TapLynx, the instructions for adding the HTML file are well documented in the supporting wiki. For this example, we make a configuration change to the NGConfig in our TapLynx project so that we can show the controller and have it display a file called form_test.html which we have copied into our XCode project. Our NGConfig looks like this:

The form_test.html file is a pretty simple html file and the code for the file looks like this:

Finally, here is the code for the .php file that is processing the data. Notice that I have included a little javascript link tag to take the person back to the initial form.

Any other issues? Well, the initial page needs to be local to the system. This is sort of contrary to a big part of TapLynx where you can have the configuration file remote and the rss feeds remote so you can make changes without resubmitting the application for approval by Apple. Also, my .php processing form is not on the phone, it's on my server. You can have your file link to other files on the phone (they will all be in the same directory on the phone regardless of if you have them in different folders in XCode). However, I can't think of a real reason in the context of a TapLynx application where I would want to do this. The .php file won't execute on the phone because the phone is just a browser.
So, if you're working on a TapLynx application and you want a few little things to be custom and you know some html and javascript, you can get the job done and extend your application and still not have to learn Objective-C (which is kind of the point, right?). I'm thinking of making a little glossary and dictionary for one of my applications and this is going to be just the thing.
0 comments:
Post a Comment