|
-
Oct 4th, 2005, 08:00 PM
#1
Thread Starter
Frenzied Member
PDA Redirect?
i found this code and i thought i might add it to my website but how do i change it so palm OS or other palms will be redirected too?
Code:
<SCRIPT LANGUAGE = "JavaScript">
var isCE = navigator.appVersion.indexOf("Windows CE")>0;
if (isCE)
{
window.location.href="mymobile.htm";
}
</script>
Last edited by wiz126; Oct 16th, 2005 at 06:31 PM.
-
Oct 4th, 2005, 08:05 PM
#2
Hyperactive Member
Re: stupid javascripts quesetion?
-
Oct 4th, 2005, 08:08 PM
#3
Hyperactive Member
Re: stupid javascripts quesetion?
-
Oct 12th, 2005, 07:49 AM
#4
Member
Re: stupid javascripts quesetion?
I suggest using PHP. As far as I have seen only Windows CE can be detected using javascript. Here is the PHP:
Code:
<?
if (stristr($ua, "Windows CE") or stristr($ua, "AvantGo") or stristr($ua,
"Mazingo") or stristr($ua, "Mobile") or stristr($ua, "T68") or stristr($ua,
"Syncalot") or stristr($ua, "Blazer") )
{
$DEVICE_TYPE="MOBILE";
}
if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE")
{
$location='mobile/index.php';
header ('Location: '.$location);
exit;
}
?>
-
Oct 16th, 2005, 06:30 PM
#5
Thread Starter
Frenzied Member
Re: stupid javascripts quesetion?
i really don't want php or cgi or asp. is there another way
-
Oct 16th, 2005, 06:35 PM
#6
Thread Starter
Frenzied Member
Re: PDA Redirect?
i found this code but i don't know how to use it:
Code:
if( strBrowser == "x11" ¦¦ strBrowser.IndexOf("palmos")!= -1 ¦¦ strBrowser.IndexOf("windows ce")!= -1 ¦¦ strBrowser.IndexOf("palm os")!= -1 ¦¦ (width< 640 .... other conditionsResponse.Redirect("./pda/default.aspx");
-
Oct 18th, 2005, 12:04 PM
#7
Member
Re: PDA Redirect?
that is asp . . . which you said that you dont want to use.
-
Oct 20th, 2005, 10:14 AM
#8
Thread Starter
Frenzied Member
Re: PDA Redirect?
hee my bad,
is there a way to add an asp code like this to my regular html page?
-
Oct 20th, 2005, 04:46 PM
#9
Member
Re: PDA Redirect?
Put the script in a page and save it as something.asp (whatever you want) and then use the line:
<!-- #INCLUDE FILE="something.asp" -->
to include it in your html page.
Then again, you could just save your html file as a .asp and put the script in it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|