Login Register

disable

How do you reverse preventDefault?

I am using the following code to turn off all href links in the page div:

function disableLinks(){
        // limits links disabling to page id
        var thisdisable = dojo.query("a #page").connect("onclick",function(e)
                { e.preventDefault(); // stop the event
                });
        return true;
};

How do I turn the links back on?

Gray-out/Disable Specific TreeNodes

I am totally new to dojo and have been asked if I can help a team that is trying to use a tree widget for navigation. We are trying to figure out how to get a tree widget to display some nodes as grayed out (disabled) with others still enabled. I want to be able to display all the nodes, rather than to have nodes simply not displayed. When the user tries to click on the disabled nodes, nothing will happen. Likewise, when the user hovers over them, they should not become highlighted.

I have searched the forum and other sources but haven't found anything that seems to fit our need.

Disabling and enabling html input tag

Situation: The form submit button is at first disabled. Later, it needs to be enabled.

Problem: setAttribute doesn't work as intended.

Additional clarification: In theory, these two lines should work same:

document.addPage.akcija.disabled=false;
dojo.byId("akcija").setAttribute("disabled", false);

In practice, the first one works, the other doesn't. Here are console printouts:

document.addPage.akcija.disabled=false;

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>

How to disable check box in grid cell?

I need to be able to disable the checkbox in a column on a row by row basis. How do you get access to the input tag within the cell to change it properties?

The status of the row determines if the checkbox is disabled. I've tried the following, with the current form returning the first input tag on the page in the inputCb variable which is not even a dojo object. The column is defined as a 'editor: dojox.grid.editors.Bool'. initGrid() is called from an AJAX load function after the grid has been updated with data.

Thanks

function initGrid()
{

Syndicate content