I'm in need of some assistance, and I'm losing hair at an alarming
rate, do to the handfuls I'm pulling out, trying to get this to work.
I need a simple script that when someone surfs to my site with an
iPhone, it will automatically redirect to a different html page,
formatted and designed for the iPhone. I am a complete newbie at this,
and am learning as I go along, so any technical response will most
likely confuse me horribly, so I'm looking for someone to hold my habd
through this. haha!

The page locations are as follows...

Main page for normal browsers...
/index.html

iPhone page for iPhone redirection...
/iphone/index.html

The script I was trying to use is as follows...

<script language="Javascript">
<!--

if (navigator.userAgent.indexOf('iPhone') != -1) {
document.location = "iphone/index.html";

}

if (screen.width <= 481) {
document.location = "index.htm";

}

//-->
</script>

Anything you can do to help would be amazing!

Thanks!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to