On Sat, 22 May 2004 12:00:12 +0000 (UTC), "Jukka K. Korpela"
<jkorpela@cs.tut.fi> wrote:
[color=blue]
>Naturally the user would need to be informed about such a possibility,
>but a short textual note about this in the notice itself should suffice.
>It should be JavaScript-generated for obvious reasons.[/color]
The problem with generating the note with javascript is that the
ability to change style and write content is not tied together, I'm
very wary of having instructions to users which may not be correct as
you note, the approach may be something like:
document.write('<span id=chicken'+
'style="display:none">message</span>');
chk=document.getElementById('chicken');
if (chk && chk.style) {
chk.style.display='block';
}
based on the idea that if you can display a block, you'll also be able
to hide the other one.
Also note that document.write is not available in the majority of
XHTML UA's so this is very much a HTML approach.
[color=blue]
>Alternatively you could use the same approach in order to change the
>visual effects (like background color) without removing the notice text
>itself. This may take some more code, if several presentational features
>have been used for highlighting the notice.[/color]
Changing the CSS class would be simple.
[color=blue]
>But why hasn't this simple technique been used? Are there some problems
>that I cannot see now?[/color]
I just think people just don't do it - we do see it in the overlaid
adverts, which have also added in a time delay.
Jim.
--
comp.lang.javascript FAQ -
http://jibbering.com/faq/