473,804 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get at the clients' screen size ?

I want to write a Server Side PHP program that generates a HTML page
client side.
How would I get at the clients' screen size, before serving the
generated page ?
Would it be a two-step process: first let the client execute a piece
of JavaScript to generate Height and Width, and then send those values
to the PHP server (FORM, PUT) ?
Or can it be done in only one PHP program ?
frgr
Erik
Jul 17 '05
13 5752
I noticed that Message-ID:
<MP************ ************@Ne ws.Individual.N ET> from John Dunlop
contained the following:
If by "very few" you mean "many" (or "relatively few"), then I
suppose I must agree. :-) One might understandably be surprised at
how easy it is to be excluded from websites rigged up by designers
who are long on complacency and short on sound advice.

http://www.google.com/search?q=%22yo...%20doesn%20%22


The picture doesn't look quite so bad if you exclude frames
http://www.google.com/search?q=%22yo...oesn%22-frames

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #11
On Wed, 07 Apr 2004 08:43:33 +0100, John Dunlop wrote:

Unfortunately, ignorant designers being two a penny now

Typically windoze (l)users / deezyners and think that IE is the be all and
end all.

It must be horrible having tunnel vision.. blurry tunnel vision at that.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #12

"Erik" <et57 at correos calor dot com> wrote in message
news:94******** *************** *********@4ax.c om...
I want to write a Server Side PHP program that generates a HTML page
client side.
How would I get at the clients' screen size, before serving the
generated page ?
Would it be a two-step process: first let the client execute a piece
of JavaScript to generate Height and Width, and then send those values
to the PHP server (FORM, PUT) ?
Or can it be done in only one PHP program ?
frgr
Erik


First, yes, but second, don't do it:
http://groups.google.com/groups?q=%2...4ax.com&rnum=1

Moral is, don't design your pages around the dimensions of the window that
called the page up. Just make it fit 800x600 if you have to assume a size (>
80% users), but better yet, make it fit ANY size with relative sizing. The
user can always scroll sideways (unless they use WebTV, but hey).

Garp
Jul 17 '05 #13
On Thu, 08 Apr 2004 16:16:21 +0000, Garp wrote:
[ snip ]
The user can always scroll sideways (unless they use WebTV, but hey).

And this is another of the most infamous pet hates!

Avoid the horizontal scroll bars like the plague =)

Your "relative size" statement was much better.. make it fit "any" browser
size.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
8718
by: David J Patrick | last post by:
I'm trying to rewrite the CSS used in http://s92415866.onlinehome.us/files/ScreenplayCSSv2.html. using the w3.org paged media standards as described at http://www.w3.org/TR/REC-CSS2/page.html The ScreenplayCSS is flawed, for several reasons; -overuse of <div id= tags -doesn't scale screen resolutions (convert from px to in, pt ?) -no media="print" (how much coule be shared between "screen" & "print") -no automatic page breaks (with...
0
264
by: Spacy | last post by:
I have 2 hyperlinks. On the click of first hyperlink, ExcelReport.aspx is executed which contains the code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment; filename=Report.xls") After this code, i write all the response.write statements that generates the html table. The Excel Report is saved perfectly. The page does not output anything on the screen. No problem till here!
9
3417
by: Les Juby | last post by:
I understand that there are several ways to effectively control the browser delivery of HTML to make the most effective use of the different screen resolutions today. (And in the foreseeable future...) I have a client with a text based site (displays a lot of labour law) which is being read in a range of resolutions and he wants a rewrite as a long term solution to browser resolution compatibility. My thinking goes........
4
1852
by: UJ | last post by:
I have a client who wants me to make a web page with a marquee on it. No problem. They want the text to be easily changeable. No problem. They want it so that the text will appear about the same size regardless of the screen resolution. Now that's my problem. In a sense, they want it so that if the screen is 800x600 and the text would be 1" tall, and then they make the screen 1600*1200, they still want the
2
3858
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...
5
6215
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in either resolution 800 X 600 or 1152 X 864 it takes up the entire explorer size. In screen resolution 800 X 600, if I insert a pictures of 24 X 24 pixel in the cells it takes up the entire cell size (ideally it should as the cell size is also 24 X...
5
9020
Atran
by: Atran | last post by:
Hello Everyone. In this article: You will know to capture the screen in 2 ways: 1)- Capture full screen. 2)- Capture region. Let's Begin: First make a new Windows Application project. And make sure your program uses these namespaces: using System;
3
1644
by: axapta | last post by:
I recently developed an application on my PC, which has quite a large screen and a high resolution. When it was deployed, clients who had a different configuration had problems with seeing all the controls and they had to use scroll bars!! Potentially all applications will be used by a wide range of users with different settings; is there a preferred way to designing applications to meet the needs of all end users? For this application,...
10
44091
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
9715
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...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10354
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
6867
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
5535
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...
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
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.