[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
<rollover> question
- From: Stephan Petersen <nospam@thanx>
 
- Date: Wed, 5 Jan 2000 14:01:02 +0100 (MET)
 
Hi everybody,
I tried using the rollover tag the other day, referencing it like this:
<rollover name="ecfp2" src="img/ecfp2.gif" overscr="img/ecfp2_a.gif">
WML (V1.7.4, Linux 2.2.5 i686) creates the following code:
[...]
<script type="text/javascript" language="JavaScript">
<!-- Hiding the code
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;
    }
}
// done hiding -->
</script>
<script type="text/javascript" language="JavaScript">
<!-- Hiding the code
if (document.images) {
    ro_img_ecfp2_n = new Image();
    ro_img_ecfp2_n.src = "img/ecfp2.gif";
    ro_img_ecfp2_o = new Image();
    ro_img_ecfp2_o.src = "";
}
// done hiding -->
</script>
<a href=""
   onMouseOver="ro_imgOver('ro_img_ecfp2', ''); return true"
   onMouseOut="ro_imgNormal('ro_img_ecfp2'); return true"
><img name="ro_img_ecfp2" src="img/ecfp2.gif" alt="" width="640" height="60" border="0"></a>
   </tr>
[...]
The problem: since there's no rollover image referenced in the line
ro_img_ecfp2_o.src = "";
the rollover effect doesn't work.
Am I using the rollover tag incorrectly, or what could be the reason for
this?
The image *does* exist on disk, if I edit the html code manually to
ro_img_ecfp2_o.src = "img/ecfp2_a.gif";
it works...
Also, is there away to avoid having a link associated with the rollover? I
just want to have the effect, but no link. As a workaround it's possible
to link to the same page, but is there a more elegant way?
All the best,
Stephan
--
Stephan Petersen                           sp@gtt.lth.rwth-aachen.de
>-=-=-=- Visit GTT's Technical Thermochemistry Web Page at =-=-=-=-<
>-=-=-=-      http://gttserv.lth.rwth-aachen.de/gtt/       =-=-=-=-<
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com