Solved

Show web browser size when changeing size of browser

Posted on 2013-11-19
5
358 Views
Last Modified: 2013-11-25
I wonder if there is any plugin or so that automatically displays the size of the browser when changing I change it's size?
0
Comment
Question by:mdoland
5 Comments
 

Expert Comment

by:Raymond Doran
ID: 39659352
What are you trying to accomplish?
0
 
LVL 15

Assisted Solution

by:unknown_routine
unknown_routine earned 167 total points
ID: 39659363
Just copy/ paste this code to your HTML(paste
it to wherever you want size of browser be printed)


<script type="text/javascript">
var winW = 630, winH = 460;
if (document.body && document.body.offsetWidth) {
 winW = document.body.offsetWidth;
 winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
 winW = document.documentElement.offsetWidth;
 winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 winW = window.innerWidth;
 winH = window.innerHeight;
}

document.writeln('Window width = '+winW);
document.writeln('Window height = '+winH);
</script>

Open in new window

0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 39659401
If you want to just see the size in the Statusbar of the browser, change
document.writeln('Window width = '+winW);
document.writeln('Window height = '+winH);

to

window.status='Window width = '+winW+ '   '+'Window height = '+winH
0
 
LVL 30

Assisted Solution

by:Alexandre Simões
Alexandre Simões earned 166 total points
ID: 39659413
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 167 total points
ID: 39659417
In Chrome, if you switch to the console view, as you size the browse, the width and height appear in real time in the upper right corner.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
execute script based on HTML event 7 23
paypal ipn url 5 55
How do I remove adware and viruses from Chrome 8 31
Web forms being filled out by bots 4 31
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Find out what you should include to make the best professional email signature for your organization.
This Micro Tutorial will demonstrate how marketers can use the Mobile Emulation Tool in Chrome Developer Tool. This will let you preview your site on any mobile device.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question