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 Design

text from input fields

Author Message
aristotle1990



Joined: 20 Jun 2005
Posts: 89
Location: Long Island, New York

Posted: Tue Aug 09, 2005 - 8:10 pm    Post subject: text from input fields Reply with quote

I have a number of text fields on my widget, some pulldown menus, and a button. Clicking this button will call a certain function, which will get the values of these fields. How exactly do I get the text from the text fields for use in my function?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
pm
Administrator


Joined: 24 Aug 2004
Posts: 398

Posted: Tue Aug 09, 2005 - 8:43 pm    Post subject: Reply with quote

Set a value to the id attribute of each field and use this to access the value:

Code:
document.getElementById("IdName").value


In other words, you could set it as the value of a variable with this:

Code:
var variable = document.getElementById("IdName").value ;
View user's profile Send private message Send e-mail Widgets
aristotle1990



Joined: 20 Jun 2005
Posts: 89
Location: Long Island, New York

Posted: Tue Aug 09, 2005 - 9:05 pm    Post subject: Reply with quote

yeah, i got this under control...
View user's profile Send private message Send e-mail Visit poster's website AIM Address 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