Microsoft Internet Explorer

               
Internet Explorer Options
Utilities
Options
Objects
Tips
Browser Extensions
Security

The WebBrowser Control

Utilities

How to change the default editor for use in viewing the source of web pages.
IE View Source Default Editor.
Macromedia Flash help - movies and animation.

HTML Editors

To add eg. msdev to the HTML editors for IE (drop down from in the toolbar), create Registry entry:
HKEY_CLASSES_ROOT\.html\OpenWithList\msdev.exe
with no default value, and HKEY_CLASSES_ROOT\Applications\msdev.exe\shell\edit\command with a default value of eg.
"D:\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" %1
(See
ieinfosite: Add more programs to the Edit button.)
NB. This will create a new instance of msdev each time.

To make a particular editor the default, in IE click Tools | Internet Options ... | Programs | and select the HTML Editor from the drop dwon list.

Objects

Tools | Options... | General | Settings... | Objects ... -> \WINNT\Downloaded Program Files :
{31564D57-0000-0010-8000-00AA00389B71} - WMVAX.INF - part of Windows Media Player 7 File List for Build 7.00.00.1954
{32564D57-0000-0010-8000-00AA00389B71} - WMV8AX.INF
{A1DC3241-B122-195F-B21A-000000000000} - INSTALLER.INF
CV3 Class
DASWebDownload Class
HeartbeatCtl Class
IntraLaunch.MainControl
Microsoft Office Tools on the Web Control
NSUpdateLitCtrl Class
Shockwave ActiveX Control
Shockwave Flash Object

Tips

Links Bar: To add a shortcut to the Links bar:
Drag the Web page's icon from the Address bar directly to the Links bar. Or drag any link from a Web page, your Favorites bar, or the desktop onto the Links bar.

To remove a shortcut from the Links bar: Right-click the shortcut, and then click Delete.

To rearrange shortcuts on the Links bar: Drag a shortcut to a new place on the Links bar.

To customize shortcuts on the Links bar:
Right-click the shortcut, and then click Properties. Click the Change Icon button to select a different icon for the shortcut.

Note: If the Links bar is not visible, click the View menu, point to Toolbars, and then click Links.


Codestore tips - Domino orientated, but several general HTML and JavaScript tips.
The JavaScript Source     e.g.
Calendar for month & year.
Date format as input, and check.
Date validation, any format.
Day of the week for a given date.
Store user ID in a cookie.
Remember selected option in a cookie.
To Do list. How to display add, and delete cookies.
Bubble sort.
Sort column.
Photo album.
Right click menu.
Add up quantities and money.
Format currency field as digits are entered.
Menu that slides out when mouse moves over it.
Smart pop-up windows.
Floating layer floats back as user scrolls.
Email address validation.
WebCam on and off times.
Microsoft
How To Connect to a Running Instance of Internet Explorer
RJL Software
IServer Lookup - info on any web server.
Save any file - save local copy of any file on the web.



1. If doing a "View - Refresh" (F5) fails to refresh then try Ctrl F5. This should do a COMPLETE refresh of the page and all resources linked to it, such as images and stylesheets etc.


2. For links whose action is irreversible, to make the user confirm what they are doing, use the JavaScript onclick event:
<A href="..." onclick="return confirm('Are you sure?');">...</A>
e.g. Go to There
There.


3. An alternative to onmouseover=... to display help text for an input field is to use title=...", which displays the text in a tool tip window. e.g. <INPUT title="hovering">
a. The display is a second or two slower coming up than for onmouseover.
b. With either method, if the user tabs from field to field, the help text will not be displayed.


4. Use the LABEL tag for the legends for radio buttons and check boxes.
Clicking on the legend will then have the same effect as clicking on the button. e.g.
<INPUT type=radio name="input" id="input1"><LABEL for="input1">Legend1></LABEL>
<INPUT type=radio name="input" id="input2"><LABEL for="input2">Legend2></LABEL>


5. It is possible to catch JavaScript exceptions. e.g.
<SCRIPT>
function doSomethingWrong(){
try{
xyzUndefined();
}catch( exception ){
if (exception.description == null) {
alert( "Exception: " + exception.message );
}else{
alert( "Exception: " + exception.description );
}
}
}
</SCRIPT>
<INPUT type=button value="Do Something Wrong" onclick="doSomethingWrong();">




6. In IE only, and with no DOCTYPE element, or by specifying W3C HTML version 4 - e.g.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- can use COLGROUP and COL tags to define table columns. e.g.
<TABLE>
<COLGROUP style="font-weight:bold">
<COL style="width:60px; color:red">
<COL style="width:70px; color: green">
</COLGROUP>
<COL span="3" style="width:40px;">
<TR><TD> Red, bold, 60px </TD>
<TD> Green, bold, 70px </TD>
<TD> 40px </TD>
<TD> 40px </TD>
<TD> 40px </TD>
</TR></TABLE>
Red, bold, 60px Green, bold, 70px 40px 40px 40px

In IE8 it is possible to omit the COLGROUP envelope, but only by specifying W3C HTML version 4.
i.e. Start the HTML file with
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
rather than, say,
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

BUT cannot specify a class in the COL element, and FireFox accepts COL but does not propogate many attributes or styles.
There is also the variability in IE depending on the !DOCTYPE element (or lack of it), so COL is best avoided.
Define classes and replicate class=... in each cell, or insert by software:
.red60 {width:60px; color:red; font-weight:bold;} .green70 {width:70px; color:green; font-weight:bold;} .default40 {width:40px; font-weight:bold;}
Red, bold, 60px Green, bold, 70px 40px 40px 40px


7. Avoid pressing Ctrl N as this causes a refresh, and, unlike the Refresh button, it does not call the onbeforeunload function and so bypasses the pop-up windows which warn of updates not saved.


8. To start with the cursor in a particular input box, do e.g.:
<BODY onload="document.formname.fieldname.focus();">


9. For the return key to tab to the next field:

Box 1:
Box 2:
Box 3:
Box 4:


Very similar code could be used to prevent pressing enter submitting a form.


10. To not start a moving GIF till page is loaded:
<SCRIPT>
var preload = new Image();
preload.src = "http://....gif";
function doGIF(){
document['imageName'].src = preload.src;
}
</SCRIPT>
<BODY OnLoad="doGIF()">
<IMG name="imageName" src="blank.gif" width=130 height=79>


11. Double click on any word to display dictionary definition:


12. To get the selected text:
<SCRIPT>
var text = "";
function getActiveText
(){    //=============
text = ( document.all )? document.selection.createRange().text : document.getSelection();
return true;
}
</SCRIPT>
<INPUT type=button value="Get Selected Text" onclick="getActiveText(); alert( text );">


13. To set the focus to the first field in a form:
function placeFocus
(){    //==========
if( document.forms.length > 0 ){
var field = document.forms[0];
for( i = 0; i < field.length; i++ ){
if(( field.elements[i].type == "text"
)||( field.elements[i].type == "textarea"
)||( field.elements[i].type.toString().charAt(0) == "s" )){
document.forms[0].elements[i].focus();
/*---*/     break;
}
}
}
}


14. To resize a browser window (to see if page will fit):
<A href="javascript:var w; var h;
w = prompt('Enter width:' , '');
h = prompt('Enter height:', '');
w = parseInt( w );
h = parseInt( h );
if(( w >0 )&&( h >0 )){
window.resizeTo( w, h );
}else{
alert( 'Please specify a width and height.' );
}">Resize Window</A>
Resize Window
The above link can be dragged to Links in the IE toolbar, and invoked from there for any page.
N.B. After resizing as above, the window (sometimes) cannot be further resized by dragging the edges.
Fixed resizes which may be useful are:
Resize to 640* 480
Resize to 800* 600
Resize to 1024* 768
Resize to 1152* 864
Resize to 1280*1024
Resize to 1600*1200


15. To send an email (and see http://msdn.microsoft.com/en-us/library/aa767737(v=vs.85).aspx:
window.location = "mailto:mike@chelys.demon.co.uk?subject=subject text&body=the body of text";

OR
<form action="mailto:michael.mcclellan141@gmail.com" method="get">
<input name="subject" type="hidden" value="Feedback">
Feedback: <textarea name=body cols="40">
Please type your feedback here and then click the Send Feedback button. </textarea>
<input type="submit" value="Send Feedback">
</form>
Feedback:
N.B. Spaces typed in may be replaced by + characters.


16. To browse and open a file (file opens in IE):
<FORM name=form1><INPUT type=file name="cmuds">
<INPUT type=button value="Open File" onClick="window.location= 'file:///' + document.form1.cmuds.value;">
</FORM>


17. Using a path to a folder as a URL will display the folder contents:
Choose a Drive:
or
Type in a Folder Location:


Double clicking on a file will open it, as in Explorer.

18. Simulate a pop-up window by changing the width and height of an INPUT box:


19. NT: to set or get rid of the sound when click on a link:
Start | Settings | Control Panel | Sounds | Windows Explorer | Start Navigation.


20. To display a file type (e.g. Pascal Source, .pas) in MSDEV via a click in an HTML file:
Right click on Start | Explore . . . | View | Options . . . | File Types |
if Pascal Source does not exist already, New Type | Description of type = Pascal Source |
Associated extension = .pas | Content type - leave blank | New . . . |
Action = Open ("Open with MSDEV" occurs sometimes, but this only works with Windows Explorer) |
Application used to perform action = e.g. "D:\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" "%1" |
Use DDE = yes | DD Message = Open("%1") | Application = msdev |
DDE Application Not Running - leave blank | Topic = system | OK | Close |
Confirm Open After Download = No (otherwise get "Open or Save" dialog box when click) |
Enable Quick View = No | Always show extension = yes | Close.]
- Do this for:
C++ Source .cpp
C Source .c
C/C++ Include .h
Pascal Source .pas
Pascal Include .pin
Assembler Source .asm
Assembler Include .ain
Legends for Pascal .leg
Link control .lnk
and in the HTML file use the file name as a URL. e.g. <A href="cSCA.pas">cSCA.pas</A>


21. IE bug (oct03) if cache contents get above some threshold level (which might be as low as 150Mb):
Saving an image by right click | Save Picture As... only allows .bmp format, instead of .jpg (default) and .bmp.
This also applies to pictures in newsgroups.
In IE, do Tools | Internet Options... | Temporary Internet Files: Delete Files... | OK.
and Tools | Internet Options... | Temporary Internet Files: Settings | Amount of disk space to use = 100Mb.


Browser Extensions to the Right Click Menu

See Adding Entries to the Standard Context Menu, and PCPlus #194 (aug02) HelpDesk .

Registry entry HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\MenuExt (- create if this key does not exist).
- add own key e.g. NewFunction, with default data e.g. files://c:\entmv\Html\NewScript.html - optionally add String Value Contexts with binary data in hexadecimal the OR merge of:
Default 0x01
Images 0x02
Controls 0x04
Tables 0x08
Text selection 0x10
Anchor 0x20

Use external.menuArguments to access the HTML file.

e.g. (from PCPlus) to copy the current page to the clipboard:
<SCRIPT type="text/javascript" defer>
var parentwin = external.menuArguments;
var rng = parentwin.document.body.createTextRange();
rng.execCommand( "Copy" );
</SCRIPT>

or
. . .
parentwin.document.execCommand( "SelectAll" );
parentwin.document.execCommand( "Copy" );

- See execCommand Method - executes a command on the current document, current selection, or the given range.
Also available is e.g. parentwin.document.activeElement which is the right clicked element.

More examples (from PCPlus):
French To English Dictionary ("../../Html/PCPlus/FrenchToEnglish.html")
<SCRIPT type="text/javascript">
var parentwin = external.menuArguments; var rng = parentwin.document.selection.createRange();
var str = new String( rng.text );
var op = new String ( "http://machaut.uchicago.edu/cgi-bin/FR-ENG.sh?word=" +str );
if (str=="") alert ("No text selected!"); else
open(op);
</SCRIPT>

Also:
English to French Dictionary ("../../Html/PCPlus/EnglishToFrench.html").
Dictionary Lookup ("../../Html/PCPlus/DictionaryLookup.html") - Cambridge dictionary.
Search ("../../Html/PCPlus/Search.html") - searches Google.
Spell Check ("../../Html/PCPlus/SpellingViaWord.html") - Word must be installed.
Find Domain Owner ("../../Html/PCPlus/DomainOwner.html") - uses SamSpade.
Copy Links ("../../Html/PCPlus/CopyAllLinks.html").

Security

Circumventing IE Security

Preventing local HTML files that contain the WSH control from displaying a warning message:
With RegEdit go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0
Change the key 1201 from 0x00000001 to 0x00000000

Cleaning Up

When the operator finshes a session on a PC, several bits of information may be left available to a subsequent user:
The cache files are in the Temporary Internet Files folder and they can be erased normally.
To remove the cookies, erase the contents of the Cookies folder.
The History folder contains information about the sites visited, and can be safely erased. It will be recreated when Internet Explorer next starts.

N.B. The display in Windows Explorer when viewing the Temporary Internet Files or History folders is not the actual directory contents, but an image built from index.dat database file, which is kept locked by Windows shell and cannot be erased. Even if all files from Temporary Internet Files folder have been 'erased', Explorer will show names and locations of web sites visited.
To complete cleaning, index.dat must be cleared:
Start | Settings | Control Panel | Internet Options | General | Delete Files... | OK | Clear History.

To also clear AutoComplete entries (if it is turned it on):
Start | Settings | Control Panel | Internet Options | Content | AutoComplete | Clear Forms | Clear Passwords.

For complete security, also erase unused space on the drive where the history files and the cache are stored.
(- see e.g. WebAttack: Eraser)