Re: Of mice and men
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxx>
- Date: Thu, 5 May 2005 00:50:54 +1200
Dan,
I can't thank you enough for this.
Superb.
Did you try it with the changes you suggested?
If you find it is OK in Netscape/Firefox, please mail it to me and I'll post
it to the server.
I understand if you don't have time; I've still learned a bundle from your
post and will make the changes when I get time. At the moment I'm trying to
write a very complex corporate report that is driving me up the wall and
occupying most of my energy. And I have a number of people I must see this
and next week which means some travelling and fairly intense negotiation
(even though I love it, it is still draining... :-)).
Comments interspersed below...
"LX-i" <lxi0007@xxxxxxxxxxxx> wrote in message
news:3508f$42783ecd$45491c57$18828@xxxxxxxxxxxxxx
> Pete Dashwood wrote:
> > Thanks for the information, Arnold.
> >
> > As far as I know there are no ActiveX controls involved. (COM is
something
> > I'm pretty fluent in...).
>
> My Firefox (under Linux) wanted a plug-in to play the wav file. (Odd,
> but it should still work without it.)
>
That's just for the click.
> > I have revised the code today, but I can't spend too much time on it and
I
> > can't test it with Netscape.
>
> You could install the latest Firefox for Windows - just be sure to make
> it *not* your default for anything, and it should leave your web
> shortcuts opening in IE the way they do today. :)
>
It's just too risky for me at the moment. On Friday I have a session
scheduled with a local vendor to supply hardware to my spec. I'm looking at
a notebook with 17in screen (built in video camera), P4 3+ GHz processor,
100GB HD (2 of these; one external for image copy), wireless and the works.
I'll load XP Pro on it and MAY set up a dual boot partition with Linux. (I
am also getting two other systems built for friends, so we should get a
reasonable deal...) Until I have that lot configured and working, and have
transferred everything from the existing machine and backed it all up to the
external hard drive on the new machine, I won't be installing anything new,
anywhere... :-)
> > What I HAVE learned today is that Netscape is MUCH more limiting in it's
use
> > of Javascript than IE is.
> >
> > It is ironic that although Netscape invented it, the MS implementation
is
> > much richer.
>
> Richard has already hit on some of this, but I decided to look at the
> code, when the timer didn't work after I started typing. (By the way -
> XHTML? I'm impressed! :> ) Let me also preface this by saying I
> realize you've probably spent more time on it than you wanted to to
> begin with, so if you don't change this particular page, it's no skin
> off my back.
>
I do want to get the cross browser stuff working because I need the
knowledge for other things. This page is an experiment in more than one way.
I just don't have the time right now to finish it as I would like to.
> You're using shortcuts that Microsoft lets you get away with, but other
> browsers do not. (Why that is, I don't know.) For example, on line 176
> (at least that's the line in my browser) you reference "tabmonths".
> This is where JavaScript gets more verbose than COBOL! ;) For it to be
> "portable", you have to qualify everything up to the document element.
> (You can define variables to use as shortcuts as well.)
>
> So, instead of just saying...
>
> tabmonths.disabled = true;
>
> ,you can say...
>
> document.getElementById("tabmonths").disabled = true;
>
I knew I needed to qualify it to the document, and I tried:
document.tables.tabmonths.disabled = true; Of course it didn't work and I
really didn't have time to bugger about with it. I've never seen
'getElementById' and it is so cool... :-)
> ...or, if you're going to reference it a lot...
>
> var tabM = document.getElementById("tabmonths");
> tabM.disabled = true;
>
It just gets better and better !!
> (You can put the "var" statement outside all of your functions, and
> it'll be globally scoped, so any functions can access it. We use that
> at work to select the documents in different parts of the frameset.)
Yes, I learned that one early on in the piece. You probably saw that I
included my globals with the globals for the stop watch.
>
> I'll bet, if you qualified all your form references with something like
> the above, it would work for everyone. There is also a "forms"
> collection, which you can use to reference your various input elements -
> these are accessed either like this...
>
> // This blanks the value of this input element
> document.forms[0].nameOfMyInputElement.value = "";
>
> ... (where [0] is the index on the page), or like this...
>
>
> // This does the same thing!
> document.forms["myFormName"].nameOfMyInputElement.value = "";
>
I read about the collections in the DOM and understand indexing into them,
but I avoid it because it looks so clumsy. I need to revisit this. Thanks
for the pointers.
> This is some stuff that I've just recently come across, and it is really
> nice, especially that getElementById method. Gone is the feud between
> document.all and document.layers - just name it and change it! :)
>
yeah, it's neat...
> > The most shocking to me was that Netscape doesn't support event handling
> > ('onClick', which is fundamental) for a <TD> tag.
>
> Not quite sure, but I think the capital "C" may be throwing you off
> (especially using XHTML).
>
Oh no! I'll check that out too. I understand and am careful with case
sensitivity in JavaScript but I may have goofed on that one...
I'm in your debt.
Thanks.
Pete.
.
- Follow-Ups:
- Re: Of mice and men
- From: LX-i
- Re: Of mice and men
- From: Donald Tees
- Re: Of mice and men
- References:
- Of mice and men
- From: Pete Dashwood
- Re: Of mice and men
- From: Arnold Trembley
- Re: Of mice and men
- From: docdwarf
- Re: Of mice and men
- From: Pete Dashwood
- Re: Of mice and men
- From: jce
- Re: Of mice and men
- From: Pete Dashwood
- Re: Of mice and men
- From: Arnold Trembley
- Re: Of mice and men
- From: Pete Dashwood
- Re: Of mice and men
- From: LX-i
- Of mice and men
- Prev by Date: Re: OT - "lie" vs "error"
- Next by Date: Re: Of mice and men
- Previous by thread: Re: Of mice and men
- Next by thread: Re: Of mice and men
- Index(es):
Relevant Pages
|