Geoff,

> 'afraid I'm not able to follow all you've written but could you just
> explain what you mean by "avoiding inline event handlers"?
>
> <input type="button" name="send" disabled="disabled" value="Send"
> onClick="getData(this.form)">
>
> Would above have to be changed/replaced?

An inline event handler means you're putting scripts in html elements
instead of separating them out, which is almost always preferred. So,
you can keep the html as (with an added id attribute):

<input type="button" name="send" id="send" disabled="disabled"
value="Send"
/>

and add a script tag to the bottom of you're page:

document.observe("dom:loaded", function () {
    if ($("send")) {
        $("send").observe("click", function (evt) {
            evt.stop();
            getData(evt.element().form);
        });
    }
});

Or something like that. So observe the DOM loaded event, and then
observe clicks on the element.

Thanks,

Nathan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to