T
Tom de Neef
I have following code:
{code}
function initialize(){
prepareHelp(JAARCBIWCL,"Header","Body");
}
function prepareHelp(el,title,txt) {
if (!el) {return}
el.hlpTitle = title;
el.hlpText = txt;
}
{code}
initialize() is called in body.onload.
JAARCBIWCL is a combobox on the form. Sometimes such control is not present
and FF hangs on the prepareHelp function call.
I have solved this by changing that line in initialize to
if (typeof(JAARCBIWCL)!="undefined")
prepareHelp(JAARCBIWCL,"Header","Body");
and that works OK, also when the element is not rendered.
My question is: can I move the test into the body of the prepareHelp
function?
Tom
{code}
function initialize(){
prepareHelp(JAARCBIWCL,"Header","Body");
}
function prepareHelp(el,title,txt) {
if (!el) {return}
el.hlpTitle = title;
el.hlpText = txt;
}
{code}
initialize() is called in body.onload.
JAARCBIWCL is a combobox on the form. Sometimes such control is not present
and FF hangs on the prepareHelp function call.
I have solved this by changing that line in initialize to
if (typeof(JAARCBIWCL)!="undefined")
prepareHelp(JAARCBIWCL,"Header","Body");
and that works OK, also when the element is not rendered.
My question is: can I move the test into the body of the prepareHelp
function?
Tom