Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Reference the apple-part object

Author Message
ianfmc



Joined: 16 Apr 2007
Posts: 4

Posted: Tue Apr 17, 2007 - 4:24 pm    Post subject: Reference the apple-part object Reply with quote

If I don't explicitly create the apple-part in my widget, is there a way to refer to that object in my Javascript? I want to dynamically change a checkbox, and I see that there are methods to do that (setEnabled) in the documentation, but I haven't been able to figure out how to get a handle for the button. When I call document.getElementById('buttonName"), I get a DIV, which makes sense since that's how it's defined in the HTML. Any help would be greatly appreciated. Thanks!
View user's profile Send private message Send e-mail Widgets
DrJon



Joined: 22 Apr 2007
Posts: 2

Posted: Mon Apr 23, 2007 - 12:31 am    Post subject: Object reference Reply with quote

I was able to access an objects properties with the following code:

var element = document.getElementById("VHCbutton");
if (element) {
element.object.textElement.style.color="white";
}

This changes the button text to white. I'm sure it could be used with a checkbox as well.

jg
View user's profile Send private message Send e-mail Widgets
ianfmc



Joined: 16 Apr 2007
Posts: 4

Posted: Thu Apr 26, 2007 - 1:16 pm    Post subject: Reply with quote

Thanks...I'll give that a try!
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group