Login Register

onclick

Double onclick handler call with Dojo 1.2 and custom widget

I'm posting this only after much Googling and searching of Dojo forums for a solution to my problem. I re-implementing a prototype web application using Dojo. (The prototype uses no JavaScript framework.) I'm a Dojo noob.

This problem surfaced when I upgraded to Dojo 1.2.0 from Dojo 1.1.1.

Problem description: for custom widgets utilizing ondijitclick, I'm getting double onclick handler invocations with Dojo 1.2 only. The key events (keyup and keydown for space and enter, respectively) work correctly in all cases.

Native DOM Events vs Their Dijit Counterparts

Recently I came across something that surprised me in Dijit. I suppose it is well known that ContentPane does not implement onClick. I found that strange (especially as I was trying to help someone connect to his ContentPane's onClick), so my first question is why? Of course I realize that the Dijit's domNode has a native onclick to which I can connect and get the same result. This got us to wondering is there a reason to prefer using a Dijit's event over the underlying native event, other than convenience? For instance why would I prefer

dijit.form.Button onClick doesn't work inside an AccordionPane

Hi all,
I'm creating programmatically an AccordionContainer with several
AccordionPanes.
Each AccordionPane has the following content: a ContentPane with text and a dijit.form.Button.
My problem is that when an AccordionPane is selected and I click on
its button the event onClick is not triggered.
I'm using dojo 1.1.x.

The routine that creates the AccordionContainer is the following:

function handleResult2(response){
var content = response.getElementsByTagName("content");

FilteringSelect - Select contents on mouseclick in the select does not work

When entering a filteringSelect via a keyboard command the contents of the select are selected. One can than immediately start typing over the 'old' value. When clicking with the mouse in a filteringSelect the cursor is placed at the clicked position. The contents of the select are not selected.

How can I change this behavior so that clicking with the mouse select all the contents?

I have tried the following without any success;
select id="test1" dojoType="dijit.form.FilteringSelect" required="true" trim="true" autocomplete="true" onFocus="dijit.byId(this.id).select();"

Invoking a JS function onclick of the TitlePane

Hi All,

I have implemented a dojo TitlePane div in my screen. I want to invoke a Java script function on click of the TitlePane.

Currently i have the below code, but the JS function 'test' is NOT called after i click the Titlepane.
------------------------------Code Snippet------------------------------

function test(){
alert('Test');
}

some code

Invoking a JS function onclick of the TitlePane

Hi All,

I have implemented a dojo TitlePane div in my screen. I want to invoke a Java script function on click of the TitlePane.

Currently i have the below code, but the JS function 'test' is NOT called after i click the Titlepane.
------------------------------Code Snippet------------------------------

function test(){
alert('Test');
}

some code

mishap handling subscribe to dijit.Tree which then causes IE to hang instead of firing onclick event created with connect

I somehow stubled upon a great way to hang IE and max out the cpu of your machine. A year later, I've finally figured out how to make it go away, so I thought I would share. I'm still using a version 1 of dojo that I downloaded on 3/10/2008 and I don't have time to deal with any new issues that might arise from upgrading to the latest version, so hopefully someone can test this on the latest.

I've left a lot of it out, but basically I have an object which I create using syntax as I've written at the end of this posting.

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;

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.

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

Syndicate content