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

Pages: 1-4041-

JavaScript DOM

Name: Anonymous 2008-11-21 7:49

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?

Name: Anonymous 2008-11-21 7:50

Read the documentation.

Name: Anonymous 2008-11-21 7:59

>>2

Which is where?

Name: Anonymous 2008-11-21 8:05

>>3
Google, DOM specs, Mozilla dev wiki, ...

Name: Anonymous 2008-11-21 8:10

how to define 'DOM' objects
You need to join the W3C and sit on a working committee.

Name: Anonymous 2008-11-21 8:12

>>5
hurr durr

Name: Anonymous 2008-11-21 8:26

Test

Name: Anonymous 2008-11-21 9:06

Ok, scratch that, how the fuck do I submit data to a URL without DOM?

Name: Anonymous 2008-11-21 9:13

>>8
XMLHttpRequest

Name: Anonymous 2008-11-21 9:45

Were you looking for document.implementation.createDocument(String namespaceURI, String qualifiedName, DocumentType doctype)? Anyway, XMLHttpRequest is probably a better approach.

Name: Anonymous 2008-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?

Name: Anonymous 2008-11-21 18:12

>>8

var data = 'here+is+data';
window.location = 'http://www.url.com/?data=' + data;

Name: Anonymous 2008-11-21 18:40

>>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: Anonymous 2008-11-21 21:26

>>13
There's a reason why Windows is the number one, undisputed operating system of all time.

Name: Anonymous 2008-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.

Name: Anonymous 2008-11-21 22:20

>>15
You emphasized the wrong word. You meant to say, you wouldn't want to actually use it, though.
Carry on.

Name: Anonymous 2008-11-21 23:17

>>14
People like toys

Name: Anonymous 2008-11-21 23:22

>>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: Anonymous 2008-11-21 23:55

>>18
No, I'm in the UK too. Maybe we could meet up and discuss this in person.

Name: Anonymous 2008-11-22 0:57

>>18
The US would emphasize as you did.

Name: Anonymous 2008-11-22 3:19

>>18,20
In Croatia, we would emphasize like >>16

Name: Anonymous 2008-11-22 4:42

So how do I access and submit the forms of a webpage without loading it over and over?

Name: Anonymous 2008-11-22 4:48

>>22
Basically you just access it and submit it. Yeah.

Name: Anonymous 2008-11-22 5:01

>>22
XMLHttpRequest or <iframe>

Name: Anonymous 2008-11-22 17:06

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.

Sorry to burst your bubble.

Name: Anonymous 2008-11-22 17:13

>>25
2/10

Name: Anonymous 2008-11-22 20:42

>>26

No troll, just facts.

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: Anonymous 2008-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.

>>27
1/10

Name: Anonymous 2008-11-23 13:06

>>27
ActionScript
Did you mean: LiveScript?

Name: Anonymous 2008-11-23 17:12

>>29

That I did. ActionScript is the abortion that Adobe tacked on to Flash. Sometimes I can't keep shitty EMCAScript implementations stright.

Name: Anonymous 2008-11-23 17:54

>>30
Shows what you know. ActionScript is far superior to JavaScript.

Name: Anonymous 2008-11-23 18:20

>>27
You really are a shirry troll, right?

Name: Anonymous 2008-11-23 18:44

>>31
Faggot (of type faggot).

Name: Anonymous 2008-11-23 19:22

faggot::Faggot

Name: Anonymous 2008-11-24 3:03

>>31

Wow, you really are a fucking idiot.

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: Anonymous 2008-11-24 16:50

>>35
i totally agree with you, javascript is wayy more advance then fucking flash

Name: Anonymous 2008-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: Anonymous 2008-11-25 0:28

>>35-36
Sure thing guys. Enjoy your slow-as-shit-performance and runtime incompatibilities.

Name: Anonymous 2008-11-25 1:18

>>38
JavaScript does not have any incompatibilities, thank you very much.

Name: Anonymous 2008-11-25 1:22

>>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: Anonymous 2008-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: Anonymous 2008-11-25 1:32

>>40
Reject all but the most recent texts, eh? Reminds me of [spoiler]JAVASCRIPT[/spoiler[

Name: Anonymous 2008-11-25 2:55

>>42
It also rejects all but the most correct BBCodes.

Name: Anonymous 2008-11-25 14:04

>>36

>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: Anonymous 2008-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.

tl;dr: enjoy your if(document.getElementById).

Name: Anonymous 2008-11-25 23:28

>>44
know-nothing
know
hurr  durr

Name: Anonymous 2008-11-26 13:39

The pleasure of being cummed inside

Name: Anonymous 2008-11-26 14:05

The please of forcing a meme

Name: Anonymous 2008-11-26 14:05

The pleasure of being cummed inside

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