[thelist] [JavaScript] event location issue restated

Tom Dell'Aringa pixelmech at yahoo.com
Wed Feb 22 09:40:19 CST 2006


Let me restate my earlier question. I have a page on this application of some 40-50 pages that has
inline event handler calls like onclick=func(). I prefer to do things unobtrusively.

So, I can add this line in my main js file:

addBodyOnload(myFunc);

And add the events at load time. The problem is, this code will execute on 40-50 pages. So is the
tradeoff worth it to add it to the onload queue? Or does it make more sense to leave it inline...
maintenance wise its better unobtrusive.

I have at least 3-5 more cases just like this I have to deal with. I want to do things cleanly,
but I don't want to bog down the application either...

Tom

http://www.pixelmech.com/
http://www.crossandthrone.com/


Professor Rumford: 'But I still don't understand about hyperspace.' 
The Doctor: 'Well, who does?' 
K9: 'I do.' 
Doctor: 'Shut up, K9!' 





More information about the thelist mailing list