views:

946

answers:

4

Hi all!

I'm new to Mac OS X Dashboard developement. Now, I have a button with id b_start. When that button is clicked, I want the label of the button to change to "Round".

Now I have tried these, but none of them work:

document.getElementById("b_start").label = "Round";
document.getElementById("b_start").text = "Round";
document.getElementById("b_start").innerText = "Round";
document.getElementById("b_start").object.setValue("Round");
document.getElementById("b_start").value = "Round";

Does anyone how I can change the button's label? Thanks in advance.

A: 

I solved the question my own. Just use this:

document.getElementById("b_start").object.textElement.innerText = "Round";
Time Machine
A: 

document.getElementById("b_start").object.setText("Round");

A: 

Any idea on how to disable a button? I see that it is just a div with some funky styles applied so not too sure if it can be done?

Mariyah
A: 

document.getElementById("b_start").object.setEnabled(false);

Peter