The FlashPalette Blog header

Using Deco Mobile sites with Flashpalette Websites

I think the most common question we have had in the past few days from our clients is “how will my clients get directed to the moblie site when accessing my website from a smart phone?”.

This is easy.  Deco Mobile now has a code you can place in the header section of your splash page that will automatically bring up your mobile website.

The code is:

<script language=javascript>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/Android/i)))
{
location.href=’http://YOUR URL/FOLDER NAME FOR YOUR mobilesite‘;
}
</script>

To put it in your FlashPalette website splash page you will have to do it manually, but it’s not hard.

1. Go to your My Documents/Flashpalette Website folder.

2. click on your index.html file in that folder.

3. For PC users right click and open with note pad, for mac users Control-Click on the file’s icon, then select text edit.

4. You will see a page of writing, look for the code htat says </HEAD>

5.  copy the code below to your index page placing it just before the </HEAD> tag.

<script language=javascript>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/Android/i)))
{
location.href=’http://YOUR URL/FOLDER NAME FOR YOUR mobilesite‘;
}
</script>

6. Change the line in red.   you will want it to have your URL and your folder name that you gave your mobile website.

7. Click save as — then save as index.html  We recommend you save it to a separate folder. This way your editor will not overwrite the changes you have made to the page when you update other parts of your website.

8. Load the new index.html page on your server, making sure to over-write the old file.

2 Comments

  1. Lynn Michelle said . . .

    I believe that you need double quote marks around the url instead of single.

    Posted June 29, 2010 at 11:48 am | Permalink
  2. Shannon said . . .

    you do not need double quotes it’s a script not a link.

    Posted June 29, 2010 at 2:44 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*