Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes What does this JavaScript syntax mean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "What does this JavaScript syntax mean?" Watch "What does this JavaScript syntax mean?" New topic
Author

What does this JavaScript syntax mean?

Sophie Cameron
Greenhorn

Joined: Jun 05, 2005
Posts: 24
I encountered this declaration in a JavaScript article but don't know what it means. Does anyone know it? Thanks.

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is an class/object

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

It creates an anonymous object instance with two properties: Element, and DOCUMENT set to the the values 1 and 2 respectively.

Equivalent to:


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yuriy Fuksenko
Ranch Hand

Joined: Feb 02, 2001
Posts: 413
I think yahoo webservices can return something like that instead of XML - it is theirs work around of domain security. Search for JSON for more info.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does this JavaScript syntax mean?
 
Similar Threads
Issue with file upload in javascript using spring controller
parse the SOAP response XML and display on jsp page
java with javascript
problem in validating multiple radioboxes in JS
ShowModalDialog Size problem