Bernard wrote:
> Suppose your scripts originate from different authors who are again
> different from the HTML author (quite a common scenario today).
> In this case that added convenience exposes you to the risk of name
> space clashes and subsequent functional failure.
Only if either one (yourself or other author) happened to be a very bad
boy so "var" was not used somewhere to declare a variable (see my
previous post). An explicit scoping "slash" is possible in a very
particular situation when you need to declare a global variable from
within a function/method. In such case an extra test is necessary or
you are in risk to get "Object doesn't support this property or method"
run-time error while trying to do something as harmless as
function myFunction() {
glbVariable_I_want_to_create = true;
}
instead it must be:
function myFunction() {
if ('undefined' != typeof glbVariable_I_want_to_create) {
// think of a better name
}
}
> To avoid this you might then want to isolate your scripts from the
> page by hiding them inside anonymous expressions which is only
> partially effective.
That's the last century technics, bindings (behaviors) are doing it
much easier and more reliable.
> Another way would be to hide your scripts in an <iframe> or <object>,
> as suggested in
> http://www.w3.org/TR/html4/present/f...ing-frame-data
> This demonstrates how to communicate with script inside <object>.
Scripting advises from W3C? I would take them with an extrem caution

frame/iframe communication is definitely possible, start a new thread
if you have a question (but before you may want to search this group
archives as this topic was answered a great number of time).