wrote on 28 jun 2007 in comp.lang.javascript
:
On Jun 27, 8:59 pm, "Evertjan." <exjxw.hannivo...@interxnl.netwrote:
> wrote on 27 jun 2007 in comp.lang.javascript:
On Jun 27, 7:17 pm, "Evertjan." <exjxw.hannivo...@interxnl.net>
wrote:
wrote on 27 jun 2007 in comp.lang.javascript:
Is it possible to have onload events on elements other than the
body tag ?
><img
src = '...jpg'
onload = 'alert(this.src+ " is found");'
onerror = 'alert(this.src+ " is NOT found");'
[please do not quote signatures, a good newsreader will skip them for
you]
what's a newsreader? what's a good newsreader? (I am using the google
groups webpage.)
[interquoting corrected]
Some Googling about "usenet" will tell you.
Does this only work for image elements?
That was not your first Q, that needed only 1 affirmative example.
I tried it on a div element and nothing :(
What would be the logic or the use?
Could you answer that re <div>?
>It is not the loading of an element that is flagged,
but the loading of external data by that element.
And <divhas none.
Do you agree with that?
regarding the topic;
I am trying to call a method which calls a number of further methods
upon some event.
"method"?
Do you mean a javascript function with "method"?
Is that all clientside code?
At the moment I have a <script... </scriptinside
my html code which calls this function. So I am trying to remove the
script from the html and place it somewhere more appropriate.
How can serverside javascript be placed more apropriate
than in the html code?
The linking to a js file like this
<script type='text/javascript' src='xxx.js'></script>
is not necessarily "better/more apropriate",
unless you want to reuse a large chunk of code in different htmls
and want to minimize download time with slow connections.
It even has some caching drawbacks.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)