Thanks Thomas,

Didn't even know this existed...

I think mine has less "invocation-overhead"; you can list children and
attribute information indiscriminately - neither needs to be inside an
array or object literal. Overall, it's a style issue, and scriptaculous
wins that match every time. :-)

Withstanding that, it's nice to see this function exists in
scriptaculous, if not prototype!

- bemson

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Thomas Fuchs
Sent: Friday, April 28, 2006 04:43
To: [email protected]
Subject: Re: [Rails-spinoffs] proposing $E & $T

Did you have a look on the script.aculo.us builder...?
http://wiki.script.aculo.us/scriptaculous/show/Builder

-Thomas

Am 28.04.2006 um 00:34 schrieb Faison, Sandford (Exchange):

> Hey all,
>
> I've had these functions for some time now, and would like to offer  
> them
> as two new dollar-sign functions - elements to be extended by  
> Prototype
> geniuses. :-)
>
> makeText(string) as $T() - return text node element
> Does just what it says... I'm sure someone could extend it nicely when
> via Prototype.
>
> (example) var x = $T('hello world');
>
>
> xElement(tagname) as $E() - return DOM element
> * return element, when tagname is a string - via ".createElement()"
> * return (deep) clone, when tagname is already a DOM element
>
> $E processes extra arguments for generating DOM trees...
> * When extra argument is an element reference, it's appended to output
> * Extra string arguments become attribute/value of output.
> * [Exception] When the only extra argument is a string, it is appended
> as a textnode.
>
> (example 1) var x = $E('p','this is a paragraph');
> (example 2) var x = $E('a','href','http:/\/cnn.com',$T('this is a
> link'))
>
> What do you think and where do I post these; should I include them  
> as an
> attachment here?
>
> - Best O'Luck!
>
> bemson
>
>
>
> **********************************************************************
> Please be aware that, notwithstanding the fact that the person sending
> this communication has an address in Bear Stearns' e-mail system, this
> person is not an employee, agent or representative of Bear Stearns.
> Accordingly, this person has no power or authority to represent, make
> any recommendation, solicitation, offer or statements or disclose
> information on behalf of or in any way bind Bear Stearns or any of its
> affiliates.
> **********************************************************************
> _______________________________________________
> Rails-spinoffs mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

--
Thomas Fuchs
wollzelle

http://www.wollzelle.com

http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before




_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs




**********************************************************************
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**********************************************************************
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to