U
Une Bévue
JSLint founds errors :
Error:
Implied global: findTextInTag 6, hash 3, keysAry 2
"findTextInTag" is an external function to the calling one
hash and keysAry are (supposed to be?) global variables defined like
that :
var keysAry = new Array();
keysAry = [ "name", "address", "tel", "email", "url", "im", "note" ];
var hash = new Array();
// "name", "address", "tel", "email", "url", "im",
"note"
hash[ "all" ] = [ true, true, true, true, true, true,
true ];
[...]
hash[ "note" ] = [ false, false, false, false, false, false,
true ];
the script is working however i wonder about those "errors", in other
word how to make the variables "hash" and "keysAry" explicitely globals
?
also, the function "findTextInTag" is called (always) from another one
"findTextInWhat", there are defined like that :
function findTextInWhat( person, txt, what ) {
// the content //
}
function findTextInTag( person, txt, tag ) {
// the content //
}
more precisely why this is an error calling "findTextInTag" from inside
"findTextInWhat" ?
what means "implied global" here ? I'd suppose implied is opposed to
explicit ?
Error:
Implied global: findTextInTag 6, hash 3, keysAry 2
"findTextInTag" is an external function to the calling one
hash and keysAry are (supposed to be?) global variables defined like
that :
var keysAry = new Array();
keysAry = [ "name", "address", "tel", "email", "url", "im", "note" ];
var hash = new Array();
// "name", "address", "tel", "email", "url", "im",
"note"
hash[ "all" ] = [ true, true, true, true, true, true,
true ];
[...]
hash[ "note" ] = [ false, false, false, false, false, false,
true ];
the script is working however i wonder about those "errors", in other
word how to make the variables "hash" and "keysAry" explicitely globals
?
also, the function "findTextInTag" is called (always) from another one
"findTextInWhat", there are defined like that :
function findTextInWhat( person, txt, what ) {
// the content //
}
function findTextInTag( person, txt, tag ) {
// the content //
}
more precisely why this is an error calling "findTextInTag" from inside
"findTextInWhat" ?
what means "implied global" here ? I'd suppose implied is opposed to
explicit ?