I have been working on an iphone web application for use with the webserver plugin. I think I got some improvements over the inspiring examples in this forum, so i am uploading it in case anybody is interested.
Some comments:
1 - It is designed as a web app that can be launched from the iPhone home screen, so, if you want to try it, load the application in Safari and click on the + button in the bottom toolbar. Then select Add to Home Screen.
2 - It supports native long button presses on desktop browsers and iphone. In order to do that, the application uses different events depending on browser type. In iphone it uses 'touchstart' and 'touchend' events, and this is what makes posible the long button presses. It is not posible to use 'mousedown' and 'mouseup' events in iphone because they are fired (also with the 'onclick' event) one after another after finger leaves the screen firing 'touchend' event.
3 - The application is faster than a regular web page because it doesn't use the 'onomousedown', 'onmouseup', or 'onClick' event, that has a delay on the iPhone. The mentiioned events are triggered with about 300 milliseconds delay to see if a user needed to perform gestures. While this is normally unnoticeable, it is annoying on a remote. Now the eventghost event is initiated as soon as the finger touches the screen and ends when the finger leaves the screen.
4 - I have implemented the buttons as table cells with some aditional attributes. For example, to assign an eventghost event to a button include the declaration egevent="eventname". To make it jump to another page, include a jump="page". To make it do another action, put action="function". The system is easily expandable. Eventghost events are initiated after 'touchstart' on iphone and after 'mousedown' on other browsers. Jumps and actions are initiated after 'touchend' and 'mouseup'.
The application doesn't works in explorer. It does with Safari and Firefox. I haven't tried other browsers, but should works if they are css compliant. In writing it, I have merciless copied code from whatever place seemed adequate. Special thanks to the WebserverDemo, the iui framework for his ccs code, and the web remote control http://www.eventghost.org/forum/viewtopic.php?f=2&t=996 from who this app evolved. I have just started to learn html, css and javascript, so bear with my mistakes. Hopefully my english is not too nasty either.
I have included two files. One is SimpleRemote.zip, with is a simple example of how the web app works. The other one is Remote.zip, which contains my evolving application in its actual state.
