Created
August 20, 2009 18:04
-
-
Save web-zen/171234 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup callback | |
var handleSuccess = function(o){ | |
datasource.sendRequest(); | |
} | |
var handleFailure = function(o){ | |
} | |
var DDcallback = | |
{ | |
success:handleSuccess, | |
failure: handleFailure, | |
}; | |
// instantiates myUsersDataSource | |
var myUsersDataSource = new YAHOO.util.XHRDataSource('db_taskmanager.php?action=select-users'); | |
// tells it what data will be returning | |
myUsersDataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; | |
// sets up the schema for what data gets parsed for use | |
myUsersDataSource.responseSchema = {resultsList: "usersList", fields: ["value", "label"]}; | |
myDDEditor.subscribe("showEvent", DDcallback) // listen for the dropdown to be clicked | |
// Define Editor for Dropdown | |
var myDDEditor = new YAHOO.widget.DropdownCellEditor({dropdownOptions:myUsersDataSource,disableBtns:true, asyncSubmitter: updateRecord}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment