1 person found this helpful
It's probably due to the sandbox. onClick="whatever()" is like an eval, which doesn't work after onload.
Why won't the other form work? That's a better way of handling events anyway, it will give you cleaner and more managable code.
The other form (with Event.observe()) would mean a lot of extra code just to get a simple click event to work. Since the app runs with a lot of Ajax content, the elements get built dynamically.
So, just to be sure, onclick() won't work on any code that is inject after the page has been loaded?
Isn't there a way to have AIR to refresh all events on the page or anything like that?
Thank you for your help!
the way you're doing your events with the onclick="" attribute is seriously depricated anyway. Learn to do it another way.
You could listen for click events on the "wrapper" element and then figure out which checkbox the click came from by interrogating the event object. Or you might find that you don't actually need to know which checkbox was clicked, but you can just get the value of all checkboxes at once and use that.
It's not really that simple, but thanks again.
(deprecated or not, it works on all browsers and is much easier and faster -- of course AIR isn't a browser, but still…)
Trust me, once you learn how to use events correctly, my way is faster and it will save you SO MUCH aggrevation.
By seperating your code out of your content you will save endless headaches.
I'd be happy to help you figure it out if you posted a larger example.
Thank you for the help.
I'll let you know if I need help with the events handling.
I'm having the same problems. I tried using the Event.observe() but it still isn't working right. I am returning content from an Ajax.Updater and basically what is being returned is:
I'm new to Air and mostly just playing around, but any help would be greatly appreciated.
Message was edited by: jrble819 -- I can't seem to get the insert RAW html feature to work correctly...