473,800 Members | 2,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting Mobile Screen Size Methods

1 New Member
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 4785
jhardman
3,406 Recognized Expert Specialist
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
qwertydesign
1 New Member
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.
Nov 19 '08 #3

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

Similar topics

0
2735
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 desktop resolution. I have tried trapping the following events: 1) SDL_ACTIVEEVENT 2) SDL_VIDEOEXPOSE
5
1703
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" && s_width == "640" ) {
0
1826
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 from mobile device (win ce.net 4.2) to pc then it doesn't work anymore. I get on error on the following statement: Dim sckSocket As New System.Net.Sockets.Socket( _
2
3857
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, then when it is brought to full size, the right edge goes off the edge of the screen. How can I code to adjust for this? If I code for checking for the left edge and the size and being a certain distance from the right edge of the screen, then...
4
7093
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
2346
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 devices when regular ASP.NET pages can be accessed from mobile devices? Ron
1
2846
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 for mobile devices using regular ASP.NET controls after giving up on "Mobile Web Forms" for several reasons. Two problems. LinkButton ========
3
1811
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 when form re size i call this function on form resize event. problem is taht when form is resize then it call the function more then one time. and take more time to execute. what is reason behind this behavior i don't know. please help me....
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.