I'm a pro Seppler who is just starting to learn JavaScript, and was wondering if any /prog/ lurkers could tell me how to define 'DOM' objects, I think they're called, I know one is called 'document', when running JavaScript from a .js file?
Were you looking for document.implementation.createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)? Anyway, XMLHttpRequest is probably a better approach.
Name:
Anonymous2008-11-21 17:50
>>10
I get 'such and such is undefined' when running from a .js file. Should I not be trying to do this with Windows Scripting Host?
>>11
1. Why use that bullshit. Windows is a toy operating system with a toy broken Javascript implementation that's only used in that good for nothing toy browser with gaping security holes unfixed since version 2.0. Moreover, Windows Scripting Host is a toy scripting system for a toy operating system with a toy API and toy features.
2. The DOM is not part of Javascript, it's part of a web browser. Use a web browser to play with it.
Name:
Anonymous2008-11-21 21:26
>>13
There's a reason why Windows is the number one, undisputed operating system of all time.
Name:
Anonymous2008-11-21 21:50
WSH is actually moderately powerful, what with being able to use COM (e.g. for WMI). I wouldn't want to actually use it, though. Fucking JScript.
>>11
Oh. Well then, considering you don't have a document... yes, you should be not be trying to do this with WSH.
>>16
No, I know what I meant. That is how I would emphasise it. I don't know anyone who would emphasise it like you, so I maybe it's a difference between the US and the UK.
Name:
Anonymous2008-11-21 23:55
>>18
No, I'm in the UK too. Maybe we could meet up and discuss this in person.
There is no such thing as 'DOM' in web standards compliance.
How do I know this? Because the concept of the DOM was created by Microsoft (look it up). Everything Microsoft does is not standards compliant. So DOM is not standards compliant.
Also, the ECMAScript spec that JavaScript is based on was co-created by Microsoft (look it up). So JavaScript is co-non-standards compliant.
Also, Microsoft created XML (look it up). Therefor there are no XML standards or XHTML standards.
MS did create the first HTML DOM (Netscapes implementation was faggy and they scrapped it in favor of IEs).
What we know as JavaScript today (implementations based on EMCAScript) was co-created by MS and Netscape with input by minor agencies. ActionScript was originally created by Netscape and renamed JavaScript in a marketing deal with Sun because ActionScript had nothing to do with JavaScript, so it made a ton of sense.
Microsoft created the XML comitee at the W3C and created XML.
And as every dev and tech fag knows, MS only does closed proprietary stuff and NEVER does anything according to ANY standards.
CAn't troll with the facts.
Name:
Anonymous2008-11-22 21:50
>>15 WSH is actually moderately powerful, what with being able to use COM (e.g. for WMI)
Completely insane, therefore worthless and useless in practice.
ActionScript is always 1 version behind the latest implementations of JavaScript.
And the only differences is in the predefined objects. And because those objects are for flash, and flash is a slow buggy piece of shit, it is just another reason AcitonScript if faggotry.
Name:
Anonymous2008-11-24 16:50
>>35
i totally agree with you, javascript is wayy more advance then fucking flash
Name:
Anonymous2008-11-24 21:31
>>36 line 1: syntax error at "i" unrecognized keyword
line 1: syntax error at "," expected sentence terminator or independent clause junction
line 1: syntax error at "javascript" unrecognized keyword
line 1: syntax error at "wayy" unrecognized keyword
line 1: grammar error at "advance" invalid keyword morphology
line 1: grammar error at "then" invalid grammatical context
line 1: warning at "fucking" assumed colloquial expletive intensifier
line 1: syntax error at "" missing .
Name:
Anonymous2008-11-25 0:28
>>35-36
Sure thing guys. Enjoy your slow-as-shit-performance and runtime incompatibilities.
Name:
Anonymous2008-11-25 1:18
>>38
JavaScript does not have any incompatibilities, thank you very much.
>>37
your english parser sucks. raising a syntax error every time it encounters a word it doesn't know isn't very useful, and breaking on non-"standard" capitalization will cause it to reject all but the most recent english texts.
Name:
Anonymous2008-11-25 1:24
>>40
It seems to have successfully made it to the end of the quasisentence. Probably he invoked it with (read-english :school-those-fuckers t).
Name:
Anonymous2008-11-25 1:32
>>40
Reject all but the most recent texts, eh? Reminds me of [spoiler]JAVASCRIPT[/spoiler[
>i totally agree with you, javascript is wayy more advance then fucking flash
confusing language and development platform. the hallmark of any terrible know-nothing 1337 programmer.
I compared JavaScript to ActionScript. Not JavaScript to Flash as you have tried to do. In this context that as an impossible comparison. What you said is so stupid it couldn't even be considered a troll attempt.
You really made yourself look like an idiot.
You need to stop using your computer and go back to scrubbing toilets.
Name:
Anonymous2008-11-25 18:08
>>35
ActionScript may be 1 version behind the latest implementations of JavaScript, but in real life, 90% of your users will not have the `latest implementation'. Hell, they may not even have a vaguely compatible implementation. This is not the case for ActionScript.