Login Register

label

Problem with button label

When i create a dijit button like this
Hi!

I always get a button with a label with a question mark in the previous line and then my label.

Something like this:
?
Hi!

Does anybody know why ? I haven't changed anything in the library because i am a beginner

thank you

dijit.form.Button overwrites "title" attribute if "showLabel" is false

UPDATE 2008-07-15
Created a bug report / ticket for this, see http://bugs.dojotoolkit.org/ticket/7185

---

Dojo version: Dojo 1.1.1
Component: dijit.form.Button
Browser: tested on FF3.0 and IE7.0

Button overwrites the attribute "title" if "showLabel" is set to false. I suppose this is a defect in method "postCreate".

Example:

var button = new dijit.form.Button(
  {
    title: "MyTitle",
    iconClass: "myIconClass",
    label: "MyLabel",
    showLabel: false
  }
);

This will render a button showing the title "MyLabel" rather than "MyTitle".

Get the id of current selected item in ComboBox

How can i get the selected item's id(not the displayed text value but the key) of a diji.form.ComboBox?
I searched in the web and this forum for about 1 days, but neither have the solution.
My data store for the ComboBox is as follows:
{identifier:"name",
items: [
{name:"China", label:"Ch"},
{name:"USA", label:"US"}
]}
and I want to get the label "Ch" or "US". However, when using the getValue(), i always get the "China" and "USA".

Changing label innerText on dijit.form.Dialog

I have been evaluating dojotoolkit recently and trying to create a dialog which will contain the feedback from a php script which goes something like (the important parts):

function submitCallback(data,ioArgs) {
                  //alert(data);
                  dijit.byId('goodMsg').setValue("Member added");
                  dijit.byId('goodDialog').show();
               }
               function submitError(data, ioArgs) {
                  //alert('Error when retrieving data from the server!');
                  dijit.byId('badDialog').show();
               }
Syndicate content