kaeli <tiny_one@NOSPAM.comcast.net> wrote in message news:<MPG.1bf3f0f431b573e998a257@nntp.lucent.com>. ..[color=blue]
> In article <ba72998e.0411032236.40ac48f2@posting.google.com >,
>
atropos@hutchcity.com enlightened us with...[color=green]
> > Hi all,
> >
> > I am green in javascripts,[/color]
>
> Want some constructive advice then?
> Stop doing browser detection.
>[color=green]
> > <script language="javascript">[/color]
>
> The language attribute is deprecated in favor of the type attribute. If you
> have to support old browsers, it doesn't hurt to use both.
> <script type="text/javascript" language="javascript">
>[color=green]
> > if (document.layers) {
> > document.write("<img src='" + pics[0] + "' border=1 width=760
> > height=600 name='displayPic'>");[/color]
>
> Are you sure that's what you want?
> I'm not sure where in the page this script is running, but usually one sees
> document.layers["layername"].document.write("some string");
> for NN4.
>[color=green]
> >
> > function showPic(whichPic,whichSize) {
> > theSize = whichSize;
> > if (whichSize == "small") {
> > var content = "<img src='"+picsS[whichPic]+"' border=1
> > name='displayPic'>";
> > }[/color]
>
> This really isn't the best way to make new pics.
> Let me know if you are curious about alternatives using createElement or new
> Image().
>[color=green]
> > else {
> > var content = "<img src='"+picsL[whichPic]+"' border=1
> > width=760 height=600 name='displayPic'>";
> > }
> > }
> > if (isIE) {
> > document.all("picDiv").innerHTML = content;[/color]
>
> I don't know what isIE is, but Opera also supports document.all.
> This is better:
>
> if (document.all && !document.getElementById)
> document.all("picDiv").innerHTML = content;
>[color=green]
> > }
> > if (isNS6) {
> > document.getElementById("picDiv").innerHTML = content;[/color]
>
> I don't know what isNS6 is, but this is better:
> if (!document.all && document.getElementById)
> document.getElementById("picDiv").innerHTML = content;
>[color=green]
> > }
> > showPicTime(whichPic);[/color]
>
> What is this function doing? Hard to trace problems without all the code.
>[color=green]
> > }
> >
> > I found that the same image will show twice ( they lies upward and
> > downward ) on the page when using netscape 7.0 but it will not when
> > using netscape 7.2 or IE.[/color]
>
> 7.0 is buggy. I've had numerous problems with it.
> I'd need to see a full testable page to play with to say any more about that.
> Got a URL with a full test example?
>
> My guess: it's appending instead of replacing. But I dunno for sure.
>
> --[/color]
Dears,
thks for yr reply. in facts I got this script from others and really
not know this much. and also thks for telling 7.0 is buggy.^-^
Rgds,
yang