Hi, Klaus
I want to hide the html code of my index iPhone, iPod or iPad, when it's open with a no browser iPhone, iPod or iPad
possible ?! !. . .
I test many things, but I don't get it
Thank's for your great work
Regards
Hi, Klaus
I want to hide the html code of my index iPhone, iPod or iPad, when it's open with a no browser iPhone, iPod or iPad
possible ?! !. . .
I test many things, but I don't get it
Thank's for your great work
Regards
Hi, sorry, but how do you mean that?
what html code should be hidden?
HI, Klaus
I want to hide the html code of the index (iPhone) or open a error page (Oups ! ! you need a iPhone, iPod or iPad to read this page), when you open this index with safari, ie or firefox
Sorry for my bad english
Hi,
you mean you want a page only for the iphone, or?
you could do that in javascript and check for the current useragent,
e.g.
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf("ipad") >= 0 || ua.indexOf("iphone") >= 0 || ua.indexOf("ipod") >= 0)
{
// ... iphone/ipod or ipad
// e.g. do the krpano embedding script code
var viewer = createswf("krpano.swf");
viewer.addVariable("xml","krpano.xml");
viewer.embed("krpanoDIV");
}
else
{
// anything else
// e.g. write some text into the krpanoDIV element
document.getElementById("krpanoDIV").innerHTML = 'error:<br>no iphone/ipad/ipod';
}
Display More
best regards,
Klaus
Hi, Klaus
Yes I only want a index for iPhone,iPod and iPad
I try to put your code but not working, perhaps I make a error in the index
Did you surround that code by script tags?
<script language="JavaScript" type="text/javascript">
//<!--<[CDATA[
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf("ipad") >= 0 || ua.indexOf("iphone") >= 0 || ua.indexOf("ipod") >= 0)
{
// ... iphone/ipod or ipad
// e.g. do the krpano embedding script code
var viewer = createswf("krpano.swf");
viewer.addVariable("xml","krpano.xml");
viewer.embed("krpanoDIV");
}
else
{
// anything else
// e.g. write some text into the krpanoDIV element
document.getElementById("krpanoDIV").innerHTML = 'error:<br>no iphone/ipad/ipod';
}
// ]]> -->
</script>
Yes !!
Hi,
I try to put your code but not working, perhaps I make a error in the index
please show your html or a link to it?
best regards,
Klaus
Hi, Klaus
It's working now, thank's
Don’t have an account yet? Register yourself now and be a part of our community!