[thelist] JS: createHTMLElement and onclick
ben morrison
morrison.ben at gmail.com
Fri Jul 7 06:00:33 CDT 2006
On 7/5/06, Matt Warden <mwarden at gmail.com> wrote:
>
> > case ( createHTMLElement.arguments[s] == 'onclick' ) :
> > onclick=function() {createHTMLElement.arguments[s+1]}; break;
>
> I assume args[s+1] is a string? In that case, I believe you want this:
>
> rtnHTMLObj.onclick = new Function(arguments[s+1]);
>
That did the trick, thankyou.
> However, you may also want to support passing a function reference, as
> you could avoid large memory use when creating many elements with the
> same onclick.
hmm not sure what you mean, am kind of at the stretch of my knowledge here
Ben
More information about the thelist
mailing list