I'm running a little project here using an ardunio board to email me when the garage door has been open too long. It all works fine and once the iPhone email toots, I can go to safari, point at the ardunio and click a button on the web page it returns to close the door.
My problem is once I click the button, the address in safari changes from 10.0.5.25 to 10.0.5.25/?T=T which is the close door command. If I don't do a back in safari before closing the phone, it stays on the command address next time I look at it and I don't want that.
Can you change the form method to "post" instead of "get". That way the arguments don't get passed via the URL. Bit hard to answer without knowing more about the rest of the app. You don't have an action in there.
I tried post but the code triggers on ?T and I don't see that coming from a post. I dump everything coming from the client to serial so I can see it all on the side and using post I don't see any T's at all?
I'm just using html cos it's there and I can't write an iphone app without a mac. But it's basic coms, The client sends a html get and the button code I posted is returned. If the button is pressed the client sends ?T=T in the get request.
action tells it which web site to send the request to and doesn't do anything in this case.
I'll try spitting it some jscript to push it back.
I did try that and got multiple ?T 's coming in once the button was pressed but I'll have another look tomorrow. I don;t think I had the url= in it. Cheers
I also ordered snow leopard off apple to try a hackintosh
Hope that does it for you. It worked here. The ?T=T appears initially after clicking the button, then after 3 secs (or whatever delay you want) goes back to the "url=...". Keep in mind it'll keep refreshing every 3 secs, not just once after 3 secs and stop. So maybe make the delay long as you think needed?
I initially used a 5 sec refresh while writing it up. It really needs a refresh so it can tell you the door is closing, the light is on etc. All a waste of time once the boy child moves out of course
Troy,
<meta http-equiv="refresh" content="3; url=http://10.0.5.25">
This line did work, after some sleep I saw I left out the ; after the time value.
It was then triggering twice for some reason but I hacked around that.
All working now Cheers.