Create your own items in IE's Context-Menu
Jake Howlett, 1 November 2000
Category: Miscellaneous; Keywords: Debug
Menu
Hidden
I don't know about you, but one of the things I do all the time, when developing web apps, is "Right Click - View Source" to show the HTML behind a page. Not only do I use this to see how other people do stuff, but also to "debug" my own code. This method has its limitations though and it would be nice to create your own debugging menu commands wouldn't it. Well now you can, if you happen to use Internet Explorer 4+
Look at the picture below. The menu shows all the usual options plus a few others.
What do these new commands do:
- Hidden Fields - shows the values of all the hidden fields on all the forms on the document. You may be thinking that you can do this by looking at the source, but if your JavaScript alters their values then this is not reflected in the source, but this new command will show their current value.
- Fill All Fields - I use this when testing forms with lots of fields. It annoys me having to continually tab through all fields, entering something like "sasasd" in each one, or selecting a value from a drop down. This will do that all for you.
- Open Frame - One of the many things that annoy me about framesets is that you cannot see the URL of the page that is loaded. This command opens the current frame in its own window.
I've used these three purely as examples, yet the possibilities are almost endless. If you want to use these or just see how it is done then:
- Download this zip file
- Close all you browser sessions
- Extract all files to a folder called "C:\IE Commands"
- Run the .reg file that should be in the new directory (if you extracted to a different directory then you need to edit the file paths in the .reg file first).
- Restart the browser, your new commands should be available. Et voila.
For the technical "in and outs" of how this works read this Microsoft page
Note: There are optional DWORD values you can apply to the new registry Keys that tells the command which Context-Menus to appear in, ie when the user right-clicks images, text, anchors etc.
Running the commands.reg file adds a set of Keys to the following branch in the Registry:
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt]
Copyright © 2000 - 2024 Jake Howlett of Rockall Design ltd. This article was printed from codestore.net