Detecting Mobile Screen Size Methods

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ultraviolet2006
    New Member
    • Mar 2008
    • 1

    Detecting Mobile Screen Size Methods

    Hi folks!

    I have a question: I am Designing a Wap Site Using XHTML-MP Language,CSS and ASP (Active Server Page), the Problem is how to detect the Screen Size of the Mobile Visiting the site, so as to assure to redirect him to the proper page for viewing the proper image size.

    I have read articles about UAPROF and iam been able to extract the x-wap-profile Header by ASP, UAPROF is a URL that points to XML document that contains information about the features and capabilities of a mobile device including the Screen Size

    What i need here is how to extract the information from the XML Document to get the Screen Size Information through ASP, i need an example or a methode to do so.

    Best Regards
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    This might not be what you are looking for, but I just use a simple javascript function like this:
    Code:
    <script language="JavaScript">
    <!-- Begin
    function rP(inH, inW, frm) {
       inH.value=screen.height;
       inW.value=screen.width;
       frm.submit();
    }
    // END -->
    </script>
    inH and inW are hidden form inputs, frm is the form and since there is nothing visible on the page it appears to move instantaneously to a page formatted for it. Let me know if this helps.

    Jared

    Comment

    • qwertydesign
      New Member
      • Nov 2008
      • 1

      #3
      Hi,

      You can look at an opensource service like WURFL which has screen size details.

      If you just want to plug in to something, you can also use a web service like handsetdetectio n.com.

      Comment

      Working...