Resizing the browser viewport
Today I've been working on electronic signage, to display meeting details on small screen outside of meeting rooms. The details themselves come from the booking system sold by my employers and the data is sucked out from the back end database by a fairly simple ASP page. The sign is really a Windows CE device embedded in a box with 640x480px display, which is configured to launch PocketIE in kiosk mode, pointing at my ASP web page when it starts up.
Nothing too complicated. However, to confirm with the client that I've developed what they actually want I need to send them screenshots. There's no facility for screenshots on the device itself, but it displays almost identically on desktop IE - from which I can easily produce screenshots. The problem is I wanted the dimensions of the displayed page in desktop IE to exactly match the dimensions of the device screen, but desktop IE has a whole load of window chrome (borders, toolbars etc.) which don't show on the device. I could have messed around trying to get the correct size manually, but I thought there had to be a way I could achieve with code.
The solution was a little harder to find than I expected, most browser resizing solutions concentrate on changing the entire window rather than the visible part, but I found a good solution at the above link. I also turned the code into a bookmarklet so I could add it to my favourites in IE by hardcoding some of the values, it should be easy enough to change if you need a different resolution.
No Comments for this post yet...