473,383 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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
Mar 4 '08 #1
2 4764
jhardman
3,406 Expert 2GB
This might not be what you are looking for, but I just use a simple javascript function like this:
Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2. <!-- Begin
  3. function rP(inH, inW, frm) {
  4.    inH.value=screen.height;
  5.    inW.value=screen.width;
  6.    frm.submit();
  7. }
  8. // END -->
  9. </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
Mar 5 '08 #2
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 handsetdetection.com.
Nov 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Erik Bethke | last post by:
Hello All, I am trying to clean up some polish bugs with the Shanghai game I am working on and I am currently stuck on trying to get the right event for detecting when the user has changed the...
5
by: Andy | last post by:
got the usual script: <script language="JavaScript" type="text/JavaScript"> var s_height = screen.Height var s_width = screen.Width var s_screen= screen.colorDepth if ( s_height == "480" &&...
0
by: Eddy_w | last post by:
Hello, I try to ping from my mobile device with a wireless connection to my pc. I found the class clsping on the internet and it works perfect with application from pc to pc but when i use it...
2
by: copyco | last post by:
Does anyone have any suggestions on this? I have a form that can be collapsed into a compact size and expanded back to full size. If the user moves the compact size of the form close to the edge,...
4
by: howa | last post by:
Hello, Any best practice in checking mobile device and re-direct them into mobile page (e.g. wap) ? E.g. User agent, screen size etc.? anything else?
5
by: rn5a | last post by:
I've come across numerous mobile phones with which ASP.NET pages can be accessed on the Internet. Then why has Microsoft developed a separate programming model to create ASP.NET apps for mobile...
1
by: David C | last post by:
I have posted this question, which I think is very simple on several sites, and nobody seems to know what I am talking about. At my wits end here. Please help. I am putting together a site...
3
by: Rishabh Indianic | last post by:
I am struggling to develop screen orientation awareness application. to solve this problem a have create two function portrait() and landscape() both function set the size and location of control...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.