zooming in script on button press
I've been working on creating a script that zooms the entire webpage. Other than using "CTRL" + "+" keys (generally compatible with all browsers) to zoom in inside a web browser, I want to put it in a different format, as a button; it would be even easier to use.
The problem is that I can't figure out how to make it work/ why it does not work. The following is my code:
Basically I was trying to use a DEC code as the code for the "CTRL" and "+" keys; then put them into a function. The "return true" under the IF statement means that I want it to hold so that the "+" key can be read as part of the script, and therefore make the page zoom in. Once that happens, it returns false.
I would appreciate any help/ suggestions. I will also try to look for a way to reset the page (100%) or zoom out as well.
This cannot possibly be your code, can it?
1. A comparison with no depending command like if/while etc?
4. Also in the button onclick you are only defining an anonymous function without calling anything
Bottom line: You need to learn more about functions, function references and functions calls
|All times are GMT +1. The time now is 11:58 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.