More no javascript: exhorations

Aaron once again exhorts us to not use the javascript: pseudo-protocol in links. Sigh. You’re right, it shouldn’t be used. But I use it all the time. Why? Because when you create new elements with the DOM, specifically new A elements, setting their onclick handler doesn’t seem to work in IE. Not even if you do it as a.setAttribute(“onclick”,”whatever”). So I use “javascript:whatever” instead, and everybody whinges. ——-

More in the discussion (powered by webmentions)

  • (no mentions, yet.)