Results 1 to 9 of 9

Thread: PDA Redirect?

  1. #1

    Thread Starter
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Question 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.
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  2. #2
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: stupid javascripts quesetion?

    wrong forum

  3. #3
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: stupid javascripts quesetion?

    i mean room thingy

  4. #4
    Member
    Join Date
    Oct 2005
    Posts
    35

    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;
    }
    
    ?>

  5. #5

    Thread Starter
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: stupid javascripts quesetion?

    i really don't want php or cgi or asp. is there another way
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  6. #6

    Thread Starter
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    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");
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  7. #7
    Member
    Join Date
    Oct 2005
    Posts
    35

    Re: PDA Redirect?

    that is asp . . . which you said that you dont want to use.

  8. #8

    Thread Starter
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: PDA Redirect?

    hee my bad,

    is there a way to add an asp code like this to my regular html page?
    1) If your post has been adequately answered please click in your post on "Mark Thread Resolved".
    2) If someone has been useful to you please show your respect by rating their posts.
    3) Please use [highlight="VB"] 'your code goes in here [/highlight] tags when posting code.
    4) Before posting your question, make sure you checked this links:
    MICROSOFT MSDN -- VB FORUMS SEARCH

    5)Support Classic VB - A PETITION TO MICROSOFT

    ___________________________________________________________________________________
    THINGS TO KNOW ABOUT VB: || VB Examples/Demos
    What are Classes?
    || -
    Where to place a sub/function?(global) || Webbrowser control

  9. #9
    Member
    Join Date
    Oct 2005
    Posts
    35

    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
  •  



Click Here to Expand Forum to Full Width