« MySQL Query Browser Blues | Main | Proper partitioning, FTW. »

Automating Wireless Login on the iPhone

A few people have found this to be useful so I figured I'd post it. Anyone who's logged into the campus wireless network from their iPhone have probably found it to be somewhat annoying after the third time or so. So, we in the office have created a JavaScript bookmark in Safari to automate the login process.

The fun part was figuring out how to actually get the URL onto the iPhone/iPod given the limited keyboard characters available (not sure why they restricted the character set in Safari). Just create a bookmark at any old web site, and then add the following JavaScript URL (the eureka moment was that the brackets can be URL encoded):

javascript:document.forms%5b0%5d.uid.value='examp001'; document.forms%5b0%5d.upass.value='password'; document.forms%5b0%5d.submit();

Then whenever you're presented with the wireless login page, just activate the bookmark and it'll use whatever credentials you entered in the bookmark to login. It's pretty slick. If you wanted, you could set the desturl too.