Colm MacCarthaigh wrote:
> With any client-side embedded scripting language, you're never going to
> be able to do "everything you want" convienently ... but the notion
> that writing something in Javascript means you will inevitably have to
> do deal with cross-platform bugs is a fallacy. It's fully possible to
> write portable, working, Javascript. It's simply a matter of knowing the
> standards and knowing what is portable.
I've done a lot of javascript coding and the amount of strange little
incompatibilities you have to work around is insane. Anything other than
a toy application will run in to at least one of these.
Even simple things like event handling are not portable:
function setEvent(oObject, sEventName, sEventHandler)
{
var fFunction = new Function(sEventHandler);
if (oObject.attachEvent)
{
oObject.attachEvent('on' + sEventName, fFunction);
}
else
{
oObject.addEventListener(sEventName, fFunction, false);
}
}
Nick
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!