Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I am doing it wrong in JavaScript

Name: Anonymous 2006-06-12 13:43

Yeah, JS is a scripting language and not a programming language, whatever. Anyway, I've got a page where the script does the following a couple of times:

var i = document.createElement('div');
i.innerHTML = 'some text';
i.class = 'some CSS class';
document.getElementById('element already in the page').appendChild(i);

Name: Anonymous 2006-06-14 12:44

>>14

i dunno, i like javascript being a prototype-based language. it provides a really simple system compared to traditional OO. with prototypes, you can implement classic OO, or variations to suit your taste. i'm not convinced it is harder to maintain.

you might want to look at

http://dean.edwards.name/weblog/2006/03/base/ and
http://www.crockford.com/javascript/inheritance.html

if you care about this kind of thing

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List