Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One for reghakr, perhaps? 1

Status
Not open for further replies.

kwunder

Technical User
Jun 2, 2001
860
GB
Hi,
Is there any way to add an "open in separate window" option to the right click context menu, when you right click on a link ? (from within Wme, IE5.5)

Cheers
kwunder

 
kwunder,

Unfortunaetely, I can only give a couple steps, the entire script is on my other computer which I can't access untill tomorrow. I can show you how to add this as a new icon on IE's toolbar.

Here are the contents of a .reg file that can be run to insert the correct registry settings. Call this example2.reg. Double-clicking on this file in the explorer will insert the settings in your registry.


=====================BEGIN CUT========================
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show in &New Window]
@="file://c:\\example2.htm"
"Contexts"=dword:00000001
===========================END CUT=====================
Here are the contents of "C:\example2.htm".

<SCRIPT LANGUAGE=&quot;JavaScript&quot; defer>
open(external.menuArguments.location.href);
</script>

reghakr
 
Sorry for the delayed response reghakr, I could not get tek-tips to load yesterday at all.

Anyway, I think I may be missing something.

I have copied the following into notepad.

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show in &New Window]
@=&quot;file://c:\\example2.htm&quot;
&quot;Contexts&quot;=dword:00000001


Then saved it as example2.reg
Double clicked on it and confirmed entry to registry.

What should I do now ?

thanks in advance

kwunder
 
Enter the next bit

<SCRIPT LANGUAGE=&quot;JavaScript&quot; defer>
open(external.menuArguments.location.href);
</script>

into notepad and save it as example2.htm on c:
(If I've grasped the plot!)
 
Right. Just after I posted the last reply, I noticed that I DID have an OPEN IN NEW WINDOW&quot; option in the right click box. This was before I entered the last bit as example2.htm and saved it to C:\. After I did save the last bit (.htm), I couldn't detect a difference. Should there be?

Cheers
kwunder
 
Having just tried it, no it doesn't seem to make any difference. Right clicking on a link and selecting Open in new window seems to work either way. Maybe I'm missing something!
 
Here we go again, I gotta learn to keep this info together in one place:


Here are the contents of a .reg file that can be run to insert the correct registry settings. Call this example2.reg. Double-clicking on this file in the explorer will insert the settings in your registry.
=========BEGIN CUT====================
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show in &New Window]
@=&quot;file://c:\\example2.htm&quot;
&quot;Contexts&quot;=dword:00000001
===============END CUT==================
Here are the contents of C:\example2.htm:
==============BEGIN CUT==================

<SCRIPT LANGUAGE=&quot;JavaScript&quot; defer>
open(external.menuArguments.location.href);
</script>
=============END CUT==================

You'll need to create two icons, one transparent, one colored (for the mouse-over affect to work). Place the example2.htm and the icons in the c:\windows directory.


=========================BEGIN CUT=========================
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions\{4BAF1FE1-01BA-11d4-951A-444553540000}]
&quot;CLSID&quot;=&quot;{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}&quot;
&quot;ButtonText&quot;=&quot;NewWindow&quot;
&quot;HotIcon&quot;=&quot;C:\\WINDOWS\\myIcon.ico&quot;
&quot;Icon&quot;=&quot;C:\\WINDOWS\\myIconGS.ico&quot;
&quot;Script&quot;=&quot;C:\\windows\\example2.htm&quot;
&quot;ToolTip&quot;=&quot;Open New IE Window&quot;
&quot;Default Visible&quot;=&quot;Yes&quot;
===========================END CUT========================

There's some very good information on this here:

And here's some stuff on IE6 (NICE):
How to Customize the Internet Explorer Toolbars
This article discusses a Beta release of a Microsoft product. The information in this article is provided as-is and is subject to change without notice.

No formal product support is available from Microsoft for this Beta product. For information about obtaining support for a Beta release, please see the documentation included with the Beta product files, or check the Web location from which you downloaded the release.
--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Internet Explorer 6 Public Preview for Windows 2000
Microsoft Internet Explorer 6 Public Preview for Windows 98
Microsoft Internet Explorer 6 Public Preview for Windows 98 Second Edition
Microsoft Internet Explorer 6 Public Preview for Windows Millennium Edition
Microsoft Internet Explorer 6 Public Preview for Windows NT 4.0

--------------------------------------------------------------------------------

SUMMARY
This article describes how to customize the Internet Explorer toolbars. You can easily customize the Internet Explorer 6 toolbar because there are new registry settings in Internet Explorer 6; you can customize the background color and pattern and the icon suite.

MORE INFORMATION
Depending on the original computer configuration, all of registry values that are listed in this article may not be present on your computer. If a value is not on your computer, you can enable the value's functionality by manually adding the value in Registry Editor.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.


All of the Internet Explorer 6 values are located in the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar
Customizable Toolbar Features
Lock Toolbar Locations
The Locked value determines whether you can relocate the toolbar. This value is typically modified by using the Lock Toolbars shortcut command:
Registry value: Locked
Type: DWORD
Value: 0 (the toolbar is unlocked)
Value: 1 (the toolbar is locked)
Toolbar Background
Both the BitmapMode and BackBitmapIE5 values determine the color, pattern, and other properties of the background area behind the toolbar icons. The BitmapMmode value sets the background mode and the BackBitmapIE5 value sets the location of the custom image file. Both values are required if you want a custom toolbar background.
Registry value: BitmapMode
Type: DWORD
Value: 0 (to use the Internet Explorer 6 background bitmap)
Value: 1 (to use the Internet Explorer 5.5 background bitmap)
Value: 2 (to use either a themed or third-party custom bitmap)
Registry Value: BackBitmapIE5
Type: String
Value: This value is the path to the custom background bitmap

NOTE: The BackBitmapIE5 value is required when the BitmapMode value is set to 2.
Toolbar Icons
You can change the default Internet Explorer toolbar icons if the following values are in the registry. The UseThere value sets the icon style, and the ITB(n) value sets the location of custom resource .dll file or the icon bitmaps. It is important that you choose the correct value for the icon size and resolution and the mouse state.
Registry value: UseTheme
Type: DWORD
Value: 0 (to use Internet Explorer 6 icons)
Value: 1 (to use Internet Explorer 5.5 icons)
Value: 2 (to use the themed icons or third-party customized icons)
Registry value: ITB(n)
Type: String
Contains: The path and file name of the custom icon bitmap or resource .dll file

NOTE: The ITB(n) value is required when the UseTheme value is set to 2.
Registry value Mouse state Icon size Display Resolution
ITB0 hot (hover over) 20x20 pixels 256 colors or lower
ITB1 normal 20x20 pixels 256 colors or lower
ITB2 hot 16x16 pixels 256 colors or lower
ITB3 normal 16x16 pixels 256 colors or lower
ITB4 hot 20x20 pixels High Color
ITB5 normal 20x20 pixels High Color
ITB6 hot 16x16 pixels High Color
ITB7 normal 16x16 pixels High Color

Maybe you'll need to reboot.

reghakr
 
Let's try it again.
Corrected, the example2.reg should read:


REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show In &New Window]
@=&quot;C:\\windows\\example2.htm&quot;
&quot;Contexts&quot;=dword:00000001

reghakr
 
Hi reg

Seriously cool, I had to add the button to the toolbar using the customise function, but it works like a dream! Now for a curve ball, is it possible to change the script so it opens favorites, history or whatever is open in the current window in the new window as well?
 
Paul,

It may be...it most likely can be, however I'm a little too busy now to tackle it. Good luck with it and let me know the results.

reghakr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top