Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] property instead of method
- From: geoffreyk at seanet.com (Geoff Knutzen)
- Subject: [Javascript] property instead of method
- Date: Tue May 23 22:07:48 2006
I am trying to make an object that will hold all of the properties of a
form.
Some of the properties need a bit of manipulation. For example, there are
two
values and I would like to be able to find the field that has the lowest
value.
I have been able to create a object that has methods that return the values
that I want.
var formParams = new Object();
formParams.minValue = function (){
//calc the lowest value
return theLowest
}
This works and gives me easy access like this
x = formParams.minValue();
Is there a way to make minValue a propery instead of a method
so I can get the value this way
x = formParams.minValue
I know there are other ways to do the same thing,
I am using this as a learning experience as well.
Thanks in advance.
- Follow-Ups:
- [Javascript] property instead of method
- From: Steve Clay
- [Javascript] property instead of method
- Prev by Date: [Javascript] AJAX app causing excessive browser memory usage
- Next by Date: [Javascript] Re: Javascript Digest, Vol 39, Issue 21
- Previous by thread: [Javascript] checkbox to change input field value
- Next by thread: [Javascript] property instead of method
- Index(es):