How to change the resolution of screen using JavaScript

I want to change the resolution of window screen using JavaScript. to 800 x 600
There should me a button , on clicking of that button the resolution should get changed.
mahmuodAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
leakim971Connect With a Mentor PluritechnicianCommented:
you can't
javascript can only work with browser html pages
0
 
COBOLdinosaurConnect With a Mentor Commented:
In the clientside javascript you use:

window.innerWidth=800;
window.innerHeight=600;

You can generate the javascript server side if you want, but you cannot change anything in the browser from the server side.  If you just want fixed values like 800x600 just include the javascript in your pages.

Cd&
0
 
Ray PaseurCommented:
I am moved to ask, "Why?"  What is the business reason for wanting to do this?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Ernie BeekExpertCommented:
I removed routers from your topics and replaced it with 'java'. Routers didn't really seem relevant ;)
0
 
Ernie BeekExpertCommented:
@CEHJ: Point taken (had my learning moment for the day :)
Any suggestion on what I could add? Still think routers isn't quite relevant.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.