Login Register

button

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

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".

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;

how to dijit.form.Button onMouseOver

i tried to

dojo.addOnLoad(function() {
var btn=new dijit.form.Button(
{id: "btn_1",label: "hello" ,onMouseOver: myMouseOver},dojo.byId("btn_1"));
});

but it didnt work if i change it to OnClick it does. what am i doing wrong?

another question why it's override the OnClick behavior, do i need to use dojo.connect instead?

Button behaviour

Hello,

Given this button:

<button id="d_back" dojoType="dijit.form.Button">Back</button>

If I try to add an event:

var el= document.getElementById('d_back');
  el.onclick= _back;

It seems to be removed by dijit. However this functions correctly:

<button id="d_back" onclick="d_back" dojoType="dijit.form.Button">Back</button>

It would be good if any existing event should not be cleared as currently seems to be the behaviour.

Add of a new editor: Button

The solution is simple, you want to have a button on a cell.
Just think about editor !
By extending the class dojox.grid.editors.AlwaysOn, the button will allways appear during the viewing of the grid.

Source code

dojo.provide("foo.Button");

dojo.require("dojox.grid._data.dijitEditors");
dojo.require("dijit.form.Button");

dojo.declare("foo.Button", dojox.grid.editors.AlwaysOn, {
_valueProp: 'cellValue',
constructor: function(inCell) {
this.text = this.text || this.cell.text;
this.deleteAfter = this.deleteAfter || this.cell.deleteAfter;

Circlual buttons

Hi,
Is it possible to create circular buttons in Dojo? I could have used an image here but I also need text on it... that would make my task difficult since i would need to set the z-index and keep a rack of the x and y coordinates of the image... Is there an easy javascript solution from dojo?

Regards,
Yazad Khambata
yazad3@gmail.com

Disable dijit button to prevent double clicking

<button dojoType="dijit.form.Button" widgetId="submitButton" >
                                Submit
<script type="dojo/method" event="onClick">
                                    dojo.xhrPost({
                                        url: 'memberAdd.php',
                                        load: submitCallback,
                                        error: submitError,
                                        form: 'myForm'
                                   });
this.disable(true);

                                </script>
</button>

Button with an onclick event next to a DateTextBox

Hi,

I have a DateTextBox on my page and I was wondering how to put a button next to the calendar, so when the user clicks on the button, the calendar is displayed. Another question is how to disable the default behavior, which is showing the calendar when the text field is focused.

Thanks in advance.

Regards,

Marco

latest dojo 1.0.2 button cutting off from bottom in ie 7

with either soria or tundra the button gets cut off from bottom in ie7.

I saw the patch earlier provided by Foster but that doesn't seem to work.

here is my code.

Stats!

@import "js/dijit/themes/tundra/tundra.css";

 

dojo.require("dijit.form.Form");

Overriding focused button styles

I'm trying to remove the dark dotted borders that the browser applies to a button widget. I had success in Firefox with this style:

.dj_gecko .dijitButton button:focus::-moz-focus-inner { border-color: transparent; }

Is there a way of overriding the same style in IE7?

Syndicate content