[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread T.J. Crowder
Hi, I know doing event handlers like this is bad, bad, and frowned upon, but even if i do it unobtrusively it still doesn't work in IE6 or 7. I don't know what the problem with the obtrusive one is, but I'm guessing this will address the issue with doing the unobtrusive version where you use

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread Jonathan Rosenberg
I'm still quite new to Prototype, but I think you're missing some quotes in your code below. What you have now is var para = new Element('p', {'class':'button',onclick:'alert(hello);'}).update(Alert You?); Shouldn't it be var para = new Element('p',

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread Jarkko Laine
On 29.10.2008, at 16.26, Jonathan Rosenberg wrote: I'm still quite new to Prototype, but I think you're missing some quotes in your code below. What you have now is var para = new Element('p', {'class':'button',onclick:'alert(hello);'}).update(Alert You?);

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread T.J. Crowder
Hi, var al = function() {alert(Hello); } var para = new Element('p', {class: 'button'}).update(Alert you?); para.observe('click', al); Doesn't this work in ie (after you add the paragraph to the DOM)? As you say, you have to give the browser a moment to get it into the DOM after adding it.

[Proto-Scripty] Re: obtrusive even handlers not working in generated content

2008-10-29 Thread johnrails
Thanks for the reply, T.J. i'm going to read through that article. Hopefully i can figure this out. John On Oct 29, 2:38 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, I know doing event handlers like this is bad, bad, and frowned upon, but even if i do it unobtrusively it still doesn't