I want to detect the monitor resolution with javascript. This works fine with screen.height and screen.width on the primary monitor. On a secondary monitor (extended desktop) this doesn't work! When I move the browser to the secondary monitor and call my javascript function with the resolution detection, screen.height and screen.width have still the resolution values of the primary monitor.
Does anybody know a solution for this problem?