Created
September 1, 2012 20:51
-
-
Save mbcrump/3586884 to your computer and use it in GitHub Desktop.
Code Snippet
This file contains 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> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>WorldCountriesRadComboBox</title> | |
<!-- WinJS references --> | |
<link href="//Microsoft.WinJS.1.0/css/ui-dark.css" rel="stylesheet" /> | |
<script src="//Microsoft.WinJS.1.0/js/base.js"></script> | |
<script src="//Microsoft.WinJS.1.0/js/ui.js"></script> | |
<!-- WorldCountriesRadComboBox references --> | |
<link href="/css/default.css" rel="stylesheet" /> | |
<script src="/js/default.js"></script> | |
<link href="/Telerik.UI/css/dark.css" rel="stylesheet" /> | |
<link href="/Telerik.UI/css/common.css" rel="stylesheet" /> | |
<script src="/Telerik.UI/js/jquery.js"></script> | |
<script src="/Telerik.UI/js/ui.js"></script> | |
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
var comboBox = new Telerik.UI.RadComboBox(document.getElementById("myComboBox"), { | |
dataTextField: "name", | |
placeholder: "'Select a Country" | |
}); | |
var dataSource = [ | |
{ name: 'United States', code: 'US' }, | |
{ name: 'Australia', code: 'AU' }, | |
{ name: 'Germany', code: 'DE' }, | |
{ name: 'United Kingdom', code: 'UK' }, | |
{ name: 'France', code: 'FR' }, | |
{ name: 'India', code: 'IN' } | |
]; | |
comboBox.dataSource.data = dataSource; | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="myComboBox"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment