Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] property instead of method


  • From: liorean at gmail.com (liorean)
  • Subject: [Javascript] property instead of method
  • Date: Wed May 24 17:17:37 2006

On 24/05/06, Geoff Knutzen <geoffreyk@xxxxxxxxxx> wrote:
> Nothing wrong with calling it as a method. That is probably what I will end
> up doing. I was just wondering if there was a way that I was not familiar
> with to make this a property.

If you want it dynamic, no, you can't do that in plain JavaScript. Moz
allows getters and setters, so for gecko based browsers it's doable,
but not for iew, op or saf.

> Just trying to learn a bit. And cheat if I must :)

No shortcuts for this yet, I'm afraid.
-- 
David "liorean" Andersson
<uri:http://liorean.web-graphics.com/>