Created
August 21, 2009 13:32
-
-
Save web-zen/171995 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
| http://techdocs.local/db_taskmanager.php?action=select-usersDataSource%20instance0 | |
| var handleSuccess = function(o){ | |
| alert("success"); | |
| }; | |
| var handleFailure = function(o){ | |
| alert("failure"); | |
| }; | |
| var DDcallback = | |
| { | |
| success:handleSuccess, | |
| failure: handleFailure | |
| }; | |
| // Get list of users | |
| var myUsersDataSource = new YAHOO.util.XHRDataSource('db_taskmanager.php?action=select-users'); // instantiate XHRDataSource for Ajax | |
| myUsersDataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; // expect to parse JSON data | |
| myUsersDataSource.responseSchema = {resultsList: "usersList", fields: ["value", "label"]}; // columns to pass into a datatable object | |
| // Define Editors for DataTable | |
| var myEditor = new YAHOO.widget.TextboxCellEditor({disableBtns:false, asyncSubmitter: updateRecord}); | |
| var myDDEditor = new YAHOO.widget.DropdownCellEditor({dropdownOptions:myUsersDataSource,disableBtns:true, asyncSubmitter: updateRecord}); | |
| myUsersDataSource.sendRequest(myUsersDataSource, DDcallback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment