force firefox or ie to zoom out on page load

I generally create web pages that don't scale well to browsers unless you zoom out a little (i.e. http://www.themarketblock.com ) Rather than redesign the page to a smaller scale, and being lazy, I'm hoping somebody hascode or a link to code (asp/php/java) that would force the visitors browser to zoom out. The code could be any language. TIA
LVL 12
GlennHarrisAsked:
Who is Participating?
 
nergikCommented:
You would need a signed script to access prefs: http://www.mozilla.org/projects/security/components/signed-scripts.html
E.g code like this could do it (this code only works if run on a local page, you get a security pop-up):

javascript:(function getZoomFull(){var FZ='browser.zoom.full';try{netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesRead');var fz=navigator.preference(FZ);fz=prompt('Full Zoom: ',fz);}catch (e){alert('Permission to access browser.zoom.full was denied');}})();


But i Really Really Really recommend the use of Javascript to change CSS settings when user clicks on your [+] / [-] buttons, you will be able to control the layout and the amount of zoom to be done in the diferent html elements.

0
 
Jason C. LevineNo oneCommented:
I don't think you're going to be able to do that.  The user's zoom settings are under  their control and no scripting language interacts with it (to the best of my knowledge).

What you can do is detect the viewport and scale sizes based on that, but it's an inexact science at best.
0
 
GlennHarrisAuthor Commented:
OK, thanks for the advice, then maybe you can point me where to look for this code: I'll put a zoom icon for zoom in/out and want that to zoom the screen for them (since most users don't know ctrl+scroll). Thx
0
 
nergikCommented:
hello, how is this going? did you find a solution? can we help with something else?
0
 
GlennHarrisAuthor Commented:
thanks
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.