Quote:
Originally Posted by vinpkl
hi wirehopper
thanks for the reply. its working now but i have to refresh page everytime i change resolution.
i think thats the way javascript works.
vineet
|
Your absolutely right.
Javascript works on the document.
Javascript can only detect changes to the document.
And the document is being displayed by the browser.
Every time you load the document into the browser, the Javascript will run again.
Changing the resolution of your monitor does not reload the document into the browser.
So if you are resizing the browser, Javascript can detect that.
But Javascript can not detect the fact that you changed the resolution of the monitor.
And as you already know, Javascript can detect the current resolution of the monitor when it is reloaded into the browser.