Menu
Is free
check in
the main  /  Navigators / Action in default mode. What does it mean by default

Default action. What does it mean by default

2005-01-03T00: 00: 00 + 01: 00

Often, double-clicking on any of the files, we completely know exactly what happens next. For example, if we want to open an extension file. dOC, It will open in the Word editor, if so is installed on the computer, of course.

Much less often there is a need to take advantage of the context menu, i.e. Click on the file right-click and select some other action other than the default action.

But, there are several varieties of files, the default action for which represents a specific risk to the computer. Such are, for example, files with expansion. bat. (executable file) and. rEG (Amendments to the Windows registry).
bat. - this is Open.. If we click on the file with the extension twice. bat., Complete commands registered in this file will be executed.
Default action for file. rEGMerge.. When double clicking, changes will be made to the registry prescribed in this file.
In order to avoid possible trouble when working with similar files, we need to change the default action for these types of files.

The default action procedure is described below in Windows XP.
Open any folder, choose the menu Tools. and Folder Options..

In the tab File Types. Find in the list of extensions the extension we need, for example. rEG.

As we see, the default files of this type open using the registry editor, Open WITH: Registry Editor.
Click on Advanced, choose the action Edit. And install it by the default action ,.

Act Edit. It became highlighted bold font. Now, with a double click on the file with the extension. rEG It will open to edit in notepad, Notepad..

The same procedure is recommended to do for files with extension. bat.
In Windows XP, you may not find in the list File Types. Extensions bat.Since this is an extension for MS-DOS files, and Windows XP is known to do not have a relationship to DOS. So we will add this extension manually by selecting the option New
Selecting a new extension bat. Windows will offer you to associate it with MS-DOS executable files. After that, as well as in the previous case, set the default action for the files. Edit..

You may consider you need to change the default action for files and other types, now you know how to do it.

Hello! In this lesson, I would like to consider such a question as the cancellation of the default browser actions. The fact is that there are some events in the browser for which standard handlers are already fixed and here they can work with your handlers, and how to make these default handlers have been triggered. Here about this and read on.

List the basic default browser events:

  • Click on the link - you go to new pageThe address of which is specified in the href attribute.
  • Pressing the "Send" button in the form - sends these forms to the server.
  • Double click on the text - while the text will be highlighted.

So, when you processes some of these events, you often do not need to trigger handlers assigned to these events. Let's consider how to cancel them.


Cancel Browser

There are 2 ways to cancel the default browser events:

  • The main way is to use the event object, which is transmitted to the event handler function (I wrote an orb this). To cancel the browser action, use the Event.PreventDefault () method.
  • If the handler is assigned via consecutive (and not via the AddEventListener), then return False from the handler function.

Click here or here

Usually the value that the event handler returns is usually ignored.

The only exception is the Return False from the handler appointed through input, but this is usually not used.

Example: Menu

Consider an example when you need to create a menu, for example, this:

HTML-markup of the flag so that all menu items are not buttons, but references, that is, tags .

This is because some visitors are very like a combination "Right click - open in a new window." Yes, you can use and