Login Register

Programmatic

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 programmatically create a filteringSelect and its associated data store

The two functions below are two different attempts to programmatically create a filteringSelect and its associated data store. I believe I am not properly creating the data store. The first method...


function createPicklist(elemId, fldLabel, fldCount) {
showMsg("creating picklist for:\nnelemId:" + elemId + "\nlabel:" + fldLabel + "\ni:" + i);
// This function creates a filteringSelect element for the specified field from the database

// get the body element
var doc = document;
var htmlElement = doc.documentElement;

Programmatic MultiSelect

I get an error trying to create a MultiSelect programmatically.

The error is around line 21 as says: "Object doesn't support this property or method"

Has anyone had any success doing this?

Source:


<html>
<head>

<title></title>

<style type="text/css">
@import "/dojoroot/dijit/themes/tundra/tundra.css";
@import "/dojoroot/dojo/resources/dojo.css";
</style>
<style>
/* NOTE: for a full screen layout, must set body size equal to the viewport. */

Programmatically change Templated widget values?

Hi all,

I am currently trying to programmatically update a templated widget.

To provide a simplistic example, say I have the following template for a custom widget:

I want to programmatically update 'link' and 'text' above - but the link always retains the values passed to it when it was constructed, and I can't figure out how to refresh it (I did call this.startup() after altering the text and link variable values).

Programmatic ComboButtons

Hello,

I have been trying to programmatically create ComboButtons (containing drop-down items) to put in a toolbar without any success. I've searched the web far and near and have been unable to come up with any answers as to if it's possible and how to get these ComboButtons to work correctly.

Can anyone give me an example as to how this is done?

Thanks much!

[SOLVED] Tooltips do not work in programmatically created Custom Widget

I was able to correct this by creating a DOM node for the Custom Widget

// Need a domNode in the document to add the Search Form to
	var tmpDiv = dojo.body().appendChild(document.createElement('div'));
	
	// Create Search Form Widget
	var hl7SearchForm = new emory.eventsearch.HL7SearchCriteria({
		id: "hl7SearchForm_" + tabId,
		layoutAlign: "client"},tmpDiv);

My original Post:

I have a custom widget that contains tooltips that don't work when I create the widget programmatically.
I am using Dojo version: 1.0.

programmatically change widget style property?

I need to be able to programmatically change a widget's style property (backgroundColor, borderWidth, etc.).

I know how to change the DOM node's style programmatically, but not the widget itself.

I could post some sample code here if it would help... just let me know.

I have tried using attributeMap, dojo.styles(), and simply setting this.style directly and nothing so far has worked. Any ideas?

Extend dijit.Dialog with template content using arguments

OK, so far I am 0/3 for responses by anybody else but myself for any of my questions posted on this forum (to be fair, I answered - and replied to - one of my questions before anybody else had a chance to respond, but still...!) but I am stuck once again, so maybe somebody out there might be able to help me?

I am trying to do something that seems like it should be exceedingly simple - extend the dijit.Dialog widget with some additional variables and load those variables, programmatically defined, in the popup using a template.

Here is my template:

Change column size of grid programatically

Hi,

Is it possible to change the size of a column in a grid programatically?

Thank you!
J.

ValidationTextBox and regular expressions....Help!

Hi!

I'm having some trouble with the programmatic creation ov a dijit.form.ValidationTextBox:
I'm currently wondering why this doesn't work:

var validationBox = new dijit.form.ValidationTextBox({
        regExp: "[\w]+",
        required: true,
        invalidMessage: "regexp [\w]+ not fulfilled...."
},dojo.byId("tmpTagContainer"));

The problem seems to be the given Regular expression. The source file of the ValidationTextBox states, that the regular expression needs to be a string. The validation of the entered string always fails.

Syndicate content