|
home / documentation / setup / configuration files / hm_f_donothing
HM_f_DoNothing
Contrary to its name, the HM_f_DoNothing code is a necessary component of
every configuration file you create. You should insert it at the top of all
of your configuration files, and it should look exactly like the following:
function HM_f_DoNothing() {return;}
if(typeof(HM_f_UpdateDefaults)=="undefined") {
HM_f_UpdateDefaults=HM_f_DoNothing;
HM_f_SetMenuTemplate=HM_f_DoNothing;
HM_f_SetMenus=HM_f_DoNothing;
HM_f_SetItems=HM_f_DoNothing;
}
Without this code, you will encounter errors (sooner or later) in the
latest releases of each of the major browsers (IE and Mozilla). For a more thorough
explanation of why the HM_f_DoNothing code is necessary (and why we can't
just insert code into HM_Loader.js or the execution scripts to circumvent
the problem) see FAQ #14.
In addition to the HM_f_DoNothingCode above, if you are using JavaScript
expressions you may need to provide default values for any variables that you are
relying on that are initially defined outside of the configuration file itself,
including the standard HM_ variables as defined in HM_Loader.js.
For example, if you rely on the HM_NS4 variable to make decisions in your
parameter settings, you might include this line in the code above:
function HM_f_DoNothing() {return;}
if(typeof(HM_f_UpdateDefaults)=="undefined") {
HM_f_UpdateDefaults=HM_f_DoNothing;
HM_f_SetMenuTemplate=HM_f_DoNothing;
HM_f_SetMenus=HM_f_DoNothing;
HM_f_SetItems=HM_f_DoNothing;
HM_NS4=false;
}
Again, have a look at FAQ #14 for further information
and contact us if you are having any problems that you believe may be related to the
issue described there.
|