473,324 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

list an object's properties

how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function
May 22 '07 #1
4 36023
please disregard. After searching for 25 minutes, I found the answer 1
minute after posting my question. C'est la vie. <sigh>

On Tue, 22 May 2007 11:03:16 -0400, Herb <he****@mail.comwrote:
>how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function
May 22 '07 #2
On May 22, 11:03 am, Herb <her...@mail.comwrote:
how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function

var o = {}
for(att in o){
alert(o[att]);
}

May 22 '07 #3
On 22 May 2007 10:26:52 -0700, Mister Joe <mr*********@gmail.comwrote:
>On May 22, 11:03 am, Herb <her...@mail.comwrote:
>how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function


var o = {}
thanks. What's the purpose of the above approach? Why not just do:
var o;
>for(att in o){
alert(o[att]);
}

May 22 '07 #4
Herb said the following on 5/22/2007 3:14 PM:
On 22 May 2007 10:26:52 -0700, Mister Joe <mr*********@gmail.comwrote:
>On May 22, 11:03 am, Herb <her...@mail.comwrote:
>>how can I do that? I simply want to create a function which will list all
properties of any object which is supplied as an argument to the function

var o = {}

thanks. What's the purpose of the above approach? Why not just do:
var o;
Test it and see :) There is a difference in the properties a variable
possesses and the ones an Object possesses.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 22 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gerry Abbott | last post by:
Access allows all objects, tables, forms, queries, macros, modules, to be documented with common object properties, including Description, Type, modified and created dates, owner, and some...
2
by: Ric | last post by:
Please forgive me if i dont explain this situation correctly. i'll try to do my best. because the arraylist.add method only accepts one argument, i created an object with several public...
3
by: moondaddy | last post by:
I'm wanting to create a bindable list object made up of a list of business classes. I'm writing this in a vb.net 1.1 winforms app and am using a code example by Rocky Lhotka for reference...
4
by: Anton | last post by:
Hi folks, Just wondering if there is a way to retrieve a list of the names of custom properties (not inbuilt) after they have been saved to a db in order to populate a listbox? I have around 5...
5
by: Cerebrus | last post by:
Hi all, Is there any way to get a list of all the Public properties of a Class ? Something like the GetNames() function returns a list of all the items in an Enumeration. As a simple...
0
by: Bishop | last post by:
Is there some place I can get a list of skin properties that I can give to our designers?
0
by: vnu | last post by:
Hi, Hi, I am working in .net emvironment using vs2005 and vb.net as the language. In one of my project, I need to display the properties of a com object which has dynamic properties(late bind...
7
by: Sehboo | last post by:
We have several generic List objects in our project. Some of them have about 1000 items in them. Everytime we have to find something, we have to do a for loop. There is one method which does the...
3
by: Max | last post by:
Hi, there, Is there a good way to get an Object's properties' names. eg. obj={a:"aa",b:"bB",c:"Cc"}; All I mean is to get the names of "a", "b", "c". but not the values "aa", "bB", "Cc". ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.