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
<!-- Combo-handled YUI CSS files: --> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.7.0/build/reset-fonts-grids/reset-fonts-grids.css&2.7.0/build/base/base-min.css&2.7.0/build/logger/assets/skins/sam/logger.css"> | |
<!-- Combo-handled YUI JS files: --> | |
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo/yahoo-debug.js&2.7.0/build/event/event-debug.js&2.7.0/build/dom/dom-debug.js&2.7.0/build/logger/logger-debug.js"></script> |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>YUI Base Page</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css"> | |
</head> | |
<body> | |
<div id="doc" class="yui-t7"> | |
<div id="hd" role="banner"><h1>Here is my normal header position</h1></div> |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>YUI Base Page</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css"> | |
</head> | |
<body> | |
<div id="doc3" class="yui-t7"> | |
<div id="hd" role="banner"><h1>Here's the Header</h1></div> |
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
<!-- Combo-handled YUI CSS files: --> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.7.0/build/reset-fonts-grids/reset-fonts-grids.css&2.7.0/build/base/base-min.css"> |
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
// 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 the 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}); |
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
// User Dropdown Custom Formatter | |
YAHOO.widget.DataTable.Formatter.lookup = function(elCell, oRecord, oColumn, oData) { | |
var lookupTable = oColumn.lookupTable || (oColumn.editor instanceof YAHOO.widget.DropdownCellEditor) && oColumn.editor.dropdownOptions; | |
if (YAHOO.lang.isArray(lookupTable)) { | |
for (var i = 0; i < lookupTable.length; i++) { | |
if (lookupTable[i].value === oData) { | |
elCell.innerHTML = lookupTable[i].label; | |
return; | |
} |
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
// User Dropdown Custom Formatter | |
YAHOO.widget.DataTable.Formatter.lookup = function(elCell, oRecord, oColumn, oData) { | |
var lookupTable = oColumn.lookupTable || (oColumn.editor instanceof YAHOO.widget.DropdownCellEditor) && oColumn.editor.dropdownOptions; | |
if (YAHOO.lang.isArray(lookupTable)) { | |
for (var i = 0; i < lookupTable.length; i++) { | |
if (lookupTable[i].value === oData) { | |
elCell.innerHTML = lookupTable[i].label; | |
return; | |
} |
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 = | |
{ |
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
var a = 123; | |
function f() { | |
alert(a); | |
var a = 1; | |
alert(a); | |
} | |
f(); |
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
function multiplyByTwo(a, b, c, callback) { | |
var i, ar = []; | |
for(i = 0; i < 3; i++) { | |
ar[i] = callback(arguments[i] * 2); | |
} | |
return ar; | |
} | |