jeudi 28 avril 2016

Dojo Checkbox Label

Hi i have to create an Checkbox which is set up in JavaScript Code. For that we are using DOJO in our project. This Checkbox should just be visible for one project so i can't insert on html side. To realise the Checkbox wasn't a problem and also the visability. But i can't set a label which should be next to the Checkbox.

HTML Code:

JavaScript Code:

        if (this.createCheckInput)
        {
                this.checkInput = new CheckBox({
                    name: "checkBox",
                    id: "checkId",
                    value: "agreed",
                    innerHTML: "Publish", //Label i wan't to create
                    onChange: lang.hitch(this, function (p)
                    {
                            if (p == true) {

                            this.checkboxChecked = p;
                            }
                    })
                }, this.publishCheckbox);

        }

I Also tried it with another JavaScript Element but there is no DOJO Library I can use i just find the Textarea but the user should not be able to change the text.

JavaScript Code 2:

        //create title for checkbox
        if (this.createInputLabel)
        {
            this.showInputLabel = new Textarea ({
                value : 'Publish after upload'
            },this.publishCheckboxLabel);
        }

Thanks for helping :)




Aucun commentaire:

Enregistrer un commentaire