Login Register

this

Problem with OnClick function in programmatic buttons

I have created several programmatic buttons but cannot get their respective onClick functions to fire.

In the example below, the onClick works fine if the button is created declaratively in the markup, but it returns "this.OnClick is not a function" when the button is created programmatically in javascript.

This works...

<button dojotype="dijit.form.Button"
    id="Clear_Form"
    jsid="Clear_Form"
    label="Clear Form"
    onclick="clearForm()">

</button>

But for some reason this does not...


var doc = document;

Syndicate content