javascript in IE6 v NN7.1 & Firefox

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
 I have a test sample that I have been experimenting with for no particular
purpose other than learning something. I have published a sample here to illustrate the problem.

<head><style type="text/css">
#houdini {position: absolute;
             top: 0;
            left: 0; }
<div id="houdini"><img src="images/houdini4_small.jpg" width="37"
height="37" alt="Houdini" />
<script type="text/javascript"> = "250px" = "270px"

This works OK in IE, moving the image to the new coordinates, but in both
other browsers, the image is at top:0; left:0; . The error message reads
"houdini not defined" . I have been going through several tutorials, etc to
find out how houdini should be 'defined' and have come up blank.
I'm sure the solution is something very simple and I'd appreciate any help
you can offer.



Re: javascript in IE6 v NN7.1 & Firefox

Stephen T. Fox wrote:
Quoted text here. Click to load it

That's because you're using an MSIE-only way to reference an element.
Best is to use a W3C web standards way to reference an element because
most browsers currently in use support these.
is supported by MSIE 5.x, MSIE 6, MSIE 5.x for Mac, Opera 6, Opera 7,
Netscape 6.x, Netscape 7.x, Mozilla 0.9.x, Mozilla 1.x, Safari 1.x,
Konqueror 3.x, etc. and
is forward-compatible, future proof.

The error message reads
Quoted text here. Click to load it


, etc to
Quoted text here. Click to load it


Site Timeline