|
||
| Inside Technique : Introduction : The Contexts Available
A more typical registry value looks like this:
The "contexts" value tells Internet Explorer what context menus this addition will be seen in. Internet Explorer actually has several different context menus; it determines which one to display by looking at what item was right-clicked on. If your context menu entry deals only with images, for instance, it makes a lot of sense to have it available only when an image was right-clicked. If you don't include this value, your script will be in every context menu. The value for "contexts" is a hexadecimal number, in this case the "01" after "hex:". This hexadecimal number tells Internet Explorer which context menus the entry will show up in. Possible values include:
If you want to have the option display in more than one menu, add each menu's value together and use that number. Be careful, though, since hexadecimal numbers do not add like normal, base-10 numbers do. For instance, hex:08 plus hex:04 equals hex:0C, not hex:12. If you are math-impaired, the calculator included with Windows can help (try the scientific view).
That is the end of this ".REG" file. However, there is one
more value that could be added to the registry. Had it been used, it would
look like this:
This value tells Internet Explorer how to treat the script to be executed. If the above value is there, and equals "hex:01", then the script will be opened in a new window, like a pop-up alert. This window will prevent you from fiddling with the main browser window while it is open. If it is absent, like in the sample ".REG" file, the script will run silently in the background. Here comes the other half: the script code. Page 1:Introduction © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |