TECH: JavaScript Help ? was: Re: congratulations
From: | Philippe Caquant <herodote92@...> |
Date: | Friday, October 1, 2004, 15:48 |
--- Rodlox <Rodlox@...> skrev:
>
> ----- Original Message -----
> From: Philippe Caquant <
>
> > I had no time to look closely at the list today, I
> was
> > working on JavaScript, and I made my first real
> > program ! (probably very clumsy, but it works
> rather
> > nice !)
>
> good ta hear! congrats!!
>
> have nice days.
Well, at the moment it's not what I would called "nice
days". Out of ten hours work, nine of them fumbling
through the doc, trying some syntax, putting alerts
for debugging, trying something else, etc.
I was wondering if someone could give some some tips,
preferably offlist. Just now, my most itching problem
is the following:
I have a frameset. In one of the frames, I want to
load a (local) file. I found some way to do it: to
change the URL of the frame, with the help of an
<input file>. Ok, nice. The only problem is that the
file to be loaded seems to have to be an HTML one. Why
? Because if it is a plain text file, as I would love
it, I cannot attach any "onload" attribute to anything
(normally, it should be attached to the <body> tag).
And if I don't attach an "onload", I will never be
able to know when the file will be entirely loaded,
and thus I cannot modify anything in it because the
loading will most likely erase what I'll have done.
I know one also can attach an "onload" on an image.
Good. But my file is not an image, it is plain text
(one line = 1 row, column separator = for ex.
tabulation). And I just want it so.
So, is there any possibility to load a text node (for
ex) inside an existing document, and to be able to
know when the whole damned thing will be loaded ? Or
any other trick ? I couldn't find anything about it
yet.
(At the moment, what I did was to paste the text file
inside an HTML file, between <p></p> for ex, but even
that is not too good, because in HTML, the linefeeds
signaling the end of a line are not recognized, so I
had to add a special character at the end of every
line... I made it by replacing paragraph marks by some
special code in Word...)
Actually, I'm just trying to do very simple things,
not to send a spacecraft on Pluto...
Any help would be more than greatly appreciated. Life
is short, I don't want to spend all the rest of it
wondering about such things...
=====
Philippe Caquant
Ceterum censeo *vi* esse oblitterandum (Me).