[BUG] Squeak3.1beta Scamper error opening SqueakLand.org
Ned Konz
ned at bike-nomad.com
Mon Oct 22 16:03:14 UTC 2001
On Monday 22 October 2001 04:15 am, Mike Rutenberg wrote:
> If you open a Scamper and then click on the link to open SqueakLand.org,
> you get a walkback when it tries to evalute
> '\"153\"' asNumber
>
> The SqueakLand.org page displays fine in Internet Explorer. The problem
> seems to be in the evaluation of the line
>
> document.writeln("<div ID=\"navbarOver\"> <img
> src=\"/images/nav/navbar2.gif\" width=\"153\" height=\"313\"
> usemap=\"#MapOver\" border=\"0\"> </div>" );
The big problem there is that they way they wrote the Javascript, it looks to
the parser as if the comment is terminated earlier because of the
end-of-comment string inside a Javascript string literal:
153: document.write("//--> </STYLE>");
154:
155: document.writeln("<div ID=\"navbarOver\"> <img
src=\"/images/nav/navbar2.gif\" width=\"153\" height=\"313\"
usemap=\"#MapOver\" border=\"0\"> </div>" );
156: }
157:
158: //-->
Line 153 should probably have been broken up into two write() calls to avoid
confusing the parsers:
document.write("//--"); document.write("></style>");
I don't know what the standard says about this, but I'd guess that this is
illegal HTML (since the end-of-comment string is found inside a comment).
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|