WebSite X5Help Center

 
Leonardo C.
Leonardo C.
User

Recognize browser and redirecd (ipod, ipad, iphone))  en

Autore: Leonardo C.
Visite 3311, Followers 2, Condiviso 36  
Parole Chiave: ipad,ipod,recognize,redirec

Hello,


FrompreviousentriesI realizedthat fordesign "apple" website,(iPad,iPhone)I have tomake a website withoutflash elements.

Ok,clearly,the questionnow is, where I can found that head code?

Itried  dozencodesfound onlineand the resultwas justa waste of time.


Thank you.

Leonardo

Postato il
12 RISPOSTE
FLAGSA ™
FLAGSA ™
User
  • 1

    Select the main HTML page in Site Map Creation, select page/level properties 

  • 2

    Select Expert, select thetag,

  • Insert this Javascript codetag:

  • var ua = navigator.userAgent;

    var checker = {

    iOS: ua.match(/(iPhone|iPod|iPad)/) };

    if (checker.iOS) { [removed] = "http://yourwebsitename.com/ipad.html;

    };

  • 4

    Replace the "yourwebsitename.com" domain name with your site's domain  address.

Leggi di più
Postato il da FLAGSA ™
FLAGSA ™
FLAGSA ™
User

Use this one sorry the wind blew and screwed up what I was typing/font. It is clearer here.

Step 1 Select the main HTML page to your website the sitemap creation. Select Page Level/properties Locate thetag

Insert this Javascript code before thetag:

[removed]

var ua = navigator.userAgent;

var checker = {

iOS: ua.match(/(iPhone|iPod|iPad)/) };

if (checker.iOS) { [removed] = "http://mywebsitename.com/ipad.html;

};

[removed]

Note replace mywebsitename.com with your own

Let us know if this works

Leggi di più
Postato il da FLAGSA ™
FLAGSA ™
FLAGSA ™
User

removed = javascript start and finish, Inco's site removes these prompts

Leggi di più
Postato il da FLAGSA ™
Mirko Boschetti
Mirko Boschetti
Moderator
FLAGSA ™
removed = javascript start and finish, Inco's site removes these prompts

To insertscript,without beingremoved, putthe textin boldand italic...Wink

Leggi di più
Postato il da Mirko Boschetti
FLAGSA ™
FLAGSA ™
User

Many thanks I learnt somethingLaughing

Leggi di più
Postato il da FLAGSA ™
Leonardo C.
Leonardo C.
User
Autore

Hi everyone,

Many thanks for the answer, but i'm still in trouble, still doesn't work...

I've attached two picture with the position of the scripts...(the program language is italian, I hope you are able to understand, sorry)

Leggi di più
Postato il da Leonardo C.
Leonardo C.
Leonardo C.
User
Autore

the script before head into home page proprieties

Leggi di più
Postato il da Leonardo C.
FLAGSA ™
FLAGSA ™
User

I will have to get hold of an Ipod to test again, by reason it should work. Didi you clear your browser cache after you uploaded?

Leggi di più
Postato il da FLAGSA ™
Leonardo C.
Leonardo C.
User
Autore

Hi,

Yes, I've cleared the browser cache but still doesn't work...Yell

The background of the "mobile" website it's red, for the computer it's black...if you have any chance to test it...www.valorigroup.it

thankx

Leggi di più
Postato il da Leonardo C.
Leonardo C.
Leonardo C.
User
Autore

I've resolved the problem using this code:

<script language=javascript>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
location.replace("http://yourwebsite.com");
}
</script>



Leggi di più
Postato il da Leonardo C.
FLAGSA ™
FLAGSA ™
User

Bravo! I was just going to buy an IPad to test....thanks for saving me the money.

As a matter of interest was it before head?

Leggi di più
Postato il da FLAGSA ™
Leonardo C.
Leonardo C.
User
Autore

Yes, before the head...

Leggi di più
Postato il da Leonardo C.