[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Quick bugdrop
- From: Chris Marston <nospam@thanx>
- Date: Tue, 18 Jul 2000 01:39:10 -0700
Er, I sent this to rse@engelschall.com, but I'm not sure it got through,
so I joined the list and am resubmitting it. :)
There seems to be a bug in WML2.0.2's <rollover> (at least, so far as
interaction with Netscape is concerned). Essentially, since each dhtml layer
(``absolutely positioned block'', in CSS-speak) is a javascript 'document'
object in its own right, any javascript it contains cannot see the javascript
functions of its peers. This means that javascript errors are thrown
when code looks like:
<span id=floatingyogi>
<rollover ... >
</span>
<span id=magicbunny>
<rollover ... >
</span>
'magicbunny's rollover will complain that the rollover functions cannot
be found.
Enclosed is a workaround in mp4h/eperl.
#workaround for an annoying rollover bug that causes
#javascript errors on dhtml netscape docs.
<define-tag span endtag=required>
<: push @LAYERS, {}; :>
<span* %attributes >
%body
</span*>
<: pop @LAYERS; :>
</define-tag>
<define-tag div endtag=required>
<: push @LAYERS, {}; :>
<div* %attributes >
%body
</div*>
<: pop @LAYERS; :>
</define-tag>
<define-tag layer endtag=required>
<: push @LAYERS, {}; :>
<layer* %attributes >
%body
</layer*>
<: pop @LAYERS; :>
</define-tag>
<define-tag cmarstonRollover whitespace=delete>
<:print q (
<script type="text/javascript" language="JavaScript">
<!-- cmarston@trentu.ca: a quick layering patch
function ro_imgNormal(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "_n.src");
self.status = '';
}
}
function ro_imgOver(imgName, descript) {
if (document.images) {
document[imgName].src = eval(imgName + "_o.src");
self.status = descript;
}
}
--> </script>
) unless ( $LAYERS[$#LAYERS]->{'rolled'} ||
$LAYERS->{'first'} );
$LAYERS[$#LAYERS]->{'rolled'} = 1;
$LAYERS->{'first'} = 0;
:>
<rollover %attributes >
</define-tag>
--
Civilization advances by extending the number of important operations which we can perform without thinking. (Alfred North Whitehead)
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com