<!DOCTYPE html>
<html>
<head runat="server">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!--script src="https://raw.github.com/marcoscaceres/jsi18n/master/jsi18n_patch.js"></script-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<title>Localized Currency - RJM Programming - November, 2017 ... thanks to https://jwcooney.com/2016/03/26/javascript-outputting-a-number-in-traditional-currency-format/</title>
<script>
var mydate=null, goodtogo=false;
var kb=location.search.split('keyboard=')[1] ? decodeURIComponent(location.search.split('keyboard=')[1].split('&')[0]) : 'en-US';
var sty=location.search.split('st=')[1] ? decodeURIComponent(location.search.split('st=')[1].split('&')[0]) : 'decimal';
var curcode=location.search.split('ccode=')[1] ? decodeURIComponent(location.search.split('ccode=')[1].split('&')[0]) : '';
var maximumFractionDigits=location.search.split('maxFractionDigits=')[1] ? decodeURIComponent(location.search.split('maxFractionDigits=')[1].split('&')[0]) : 2;
var minimumFractionDigits=location.search.split('minFractionDigits=')[1] ? decodeURIComponent(location.search.split('minFractionDigits=')[1].split('&')[0]) : 2;
var tExampleBoxOne=location.search.split('textExampleBoxOne=')[1] ? decodeURIComponent(location.search.split('textExampleBoxOne=')[1].split('&')[0]) : '';
var tExampleBoxTwo=location.search.split('textExampleBoxTwo=')[1] ? decodeURIComponent(location.search.split('textExampleBoxTwo=')[1].split('&')[0]) : '';
var rest='';
function getLang() { // thanks to https://stackoverflow.com/questions/673905/best-way-to-determine-users-locale-within-browser
if (!navigator.language && navigator.browserLanguage) return navigator.browserLanguage;
return (navigator.languages && navigator.languages.length) ? navigator.languages[0] : navigator.language;
}
function populate() {
if (window.Intl && typeof window.Intl === "object") { // future JavaScript Internationalization API food for thought ... see http://marcoscaceres.github.io/jsi18n/
//Assume it's supported, lets localize! ... active thanks to http://marcoscaceres.github.io/jsi18n/ regarding JavaScript Internationalization API via script call near top
goodtogo=true;
}
var one=1, defcur='';
rest=location.search.split('called' + one + '=')[1] ? decodeURIComponent(location.search.split('called' + one + '=')[1].split('&')[0]) : '';
if (rest != '') document.getElementById('dall').style.display='none';
document.getElementById('keyboard').value=kb;
if (curcode != '') {
document.getElementById('ccode').placeholder='';
document.getElementById('st').value=curcode;
}
document.getElementById('st').value=sty;
document.getElementById('ccode').value=curcode;
if (curcode != '') {
document.getElementById('st').value=curcode;
soc(document.getElementById('st'));
}
document.getElementById('maxFractionDigits').value='' + maximumFractionDigits;
document.getElementById('minFractionDigits').value='' + minimumFractionDigits;
if (tExampleBoxOne != '') {
document.getElementById('txtExampleBoxOne').value=tExampleBoxOne;
toFinalNumberFormat(document.getElementById('txtExampleBoxOne'));
}
if (tExampleBoxTwo != '') {
document.getElementById('txtExampleBoxTwo').value=tExampleBoxTwo;
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
}
if (kb == 'en-US' && curcode == '') {
var lis=getLang();
document.getElementById('keyboard').value=lis;
var countrys=document.getElementById('keyboard').innerHTML.split(lis);
if (countrys.length == 2) {
if (countrys[1].split(' - ').length > 1) {
var country=countrys[1].split(' - ')[1].split('<')[0].split(' ')[0];
var subcountry=country;
if (subcountry.length <= 3 && countrys[1].split(' - ')[1].split('<')[0].split(' ').length > 1) {
subcountry+=' ' + countrys[1].split(' - ')[1].split('<')[0].split(' ')[1];
}
if (subcountry.length > 5) subcountry=country.substring(0,eval(-2 + country.length));
//alert(subcountry + ' navigator.language=' + navigator.language + ' navigator.browserLanguage=' + navigator.browserLanguage);
var currs=document.getElementById('st').innerHTML.split(subcountry);
if (currs.length == 2) {
defcur=(currs[0] + ">").split('value=')[eval(-1 + (currs[0] + ">").split('value=').length)].split('>')[0].replace('"','').replace('"','').split('"')[0].split("'")[0].replace("'",'').replace("'",'');
//alert('2: ' + subcountry + ' ' + defcur);
} else if (currs.length > 2) {
subcountry='>' + country.substring(0,eval(-2 + country.length));
currs=document.getElementById('st').innerHTML.split(subcountry);
if (currs.length == 2) {
defcur=(currs[0] + ">").split('value=')[eval(-1 + (currs[0] + ">").split('value=').length)].split('>')[0].replace('"','').replace('"','').split('"')[0].split("'")[0].replace("'",'').replace("'",'');
//alert('3: ' + subcountry + ' ' + defcur);
} //else {
//alert(': ' + currs.length);
//}
}
}
if (defcur != '') {
sty='currency';
curcode=defcur;
if (curcode != '') {
document.getElementById('ccode').placeholder='';
document.getElementById('st').value=curcode;
}
document.getElementById('st').value=sty;
document.getElementById('ccode').value=curcode;
if (curcode != '') {
document.getElementById('st').value=curcode;
soc(document.getElementById('st'));
}
}
}
}
mydate = new Date();
document.getElementById('myh3').innerHTML=' RJM Programming - November, 2017 ... ' + mydate.toLocaleDateString(document.getElementById('keyboard').value) + ' ' + mydate.toLocaleTimeString(document.getElementById('keyboard').value);
var was=document.getElementById('txtExampleBoxTwo').value;
var rests, suffix='';
while (rest != '') {
if (rest.indexOf('`') != -1) {
rests=rest.split('`');
suffix='';
if (rests[1].indexOf(' ') != -1) {
suffix=rests[1].replace(rests[1].split(' ')[0],'');
document.getElementById('txtExampleBoxTwo').value=rests[1].replace(suffix,'');
} else {
document.getElementById('txtExampleBoxTwo').value=rests[1];
}
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
if (parent.document.getElementById(rests[0])) {
if (parent.document.getElementById(rests[0]).value) {
parent.document.getElementById(rests[0]).value=document.getElementById('txtExampleBoxTwo').value + suffix;
} else {
parent.document.getElementById(rests[0]).innerHTML=document.getElementById('txtExampleBoxTwo').value + suffix;
}
} else {
document.getElementById('drest').innerHTML+='<br><input id=dval' + one + ' value="' + document.getElementById('txtExampleBoxTwo').value + suffix + '"></input>';
}
one++;
} else {
document.getElementById('txtExampleBoxTwo').value=rest;
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
document.getElementById('drest').innerHTML+='<br><input id=dval' + one + ' value="' + document.getElementById('txtExampleBoxTwo').value + suffix + '"></input>';
one++;
}
rest=location.search.split('called' + one + '=')[1] ? decodeURIComponent(location.search.split('called' + one + '=')[1].split('&')[0]) : '';
}
document.getElementById('txtExampleBoxTwo').value=was;
}
function toFinalNumberFormat(controlToCheck){
var enteredNumber = '' + controlToCheck.value;
document.getElementById(controlToCheck.id.replace('txt','text')).value=enteredNumber;
enteredNumber = enteredNumber.replace(/[^0-9\.]+/g, ''); // remove any non-numeric, non-period character
// ******** Dollar Sign preceeding rounded, two decimal places number ********
// controlToCheck.value = Number(enteredNumber).toLocaleString('en-US', { style: 'currency', currency: 'USD' });
// ******** Non- Rounded, truncated Two Decimal Digits ********
// var outNumber = (Number(enteredNumber) ).toLocaleString('en-US', { style: 'decimal', maximumFractionDigits : 8, minimumFractionDigits : 8 });
// outNumber = outNumber.substring(0,(outNumber.indexOf('.') + 3));
// ******** Rounded Decimal Range ********
var outNumber;
if (curcode == '') {
outNumber = (Number(enteredNumber) ).toLocaleString(kb, { style: sty, maximumFractionDigits : maximumFractionDigits, minimumFractionDigits : minimumFractionDigits });
} else {
document.title=sty;
outNumber = (Number(enteredNumber) ).toLocaleString(kb, { style: sty, currency: curcode });
}
controlToCheck.value = outNumber;
// Number(enteredNumber).toLocaleString('en'); // enteredNumber.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
}
function soc(xthis) {
sty=xthis.value;
if (xthis.value != 'currency' && xthis.value != 'decimal') {
document.getElementById('ihc').innerHTML='Currency: ' + xthis.options[xthis.selectedIndex].text;
document.getElementById('ccode').placeholder='';
document.getElementById('ccode').value=sty;
curcode=sty;
document.getElementById('ihc').innerHTML='Currency: ' + xthis.options[xthis.selectedIndex].text;
sty='currency';
xthis.value='currency';
tExampleBoxOne=document.getElementById('textExampleBoxOne').value;
tExampleBoxTwo=document.getElementById('textExampleBoxTwo').value;
if (tExampleBoxOne != '') {
document.getElementById('txtExampleBoxOne').value=tExampleBoxOne;
toFinalNumberFormat(document.getElementById('txtExampleBoxOne'));
}
if (tExampleBoxTwo != '') {
document.getElementById('txtExampleBoxTwo').value=tExampleBoxTwo;
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
}
} else if (xthis.value == 'currency' && document.getElementById('ccode').value == '') {
document.getElementById('ihc').innerHTML='Currency';
curcode=prompt('Enter Currency Code','');
if (curcode == null) {
curcode='';
}
if (curcode != '') {
document.getElementById('ccode').placeholder='';
document.getElementById('ccode').value=curcode;
tExampleBoxOne=document.getElementById('textExampleBoxOne').value;
tExampleBoxTwo=document.getElementById('textExampleBoxTwo').value;
if (tExampleBoxOne != '') {
document.getElementById('txtExampleBoxOne').value=tExampleBoxOne;
toFinalNumberFormat(document.getElementById('txtExampleBoxOne'));
}
if (tExampleBoxTwo != '') {
document.getElementById('txtExampleBoxTwo').value=tExampleBoxTwo;
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
}
}
} else if (xthis.value == 'currency') {
document.getElementById('ihc').innerHTML='Currency';
} else if (xthis.value == 'decimal') {
curcode='';
document.getElementById('ccode').value=curcode;
document.getElementById('ccode').placeholder='Currency Code';
tExampleBoxOne=document.getElementById('textExampleBoxOne').value;
tExampleBoxTwo=document.getElementById('textExampleBoxTwo').value;
if (tExampleBoxOne != '') {
document.getElementById('txtExampleBoxOne').value=tExampleBoxOne;
toFinalNumberFormat(document.getElementById('txtExampleBoxOne'));
}
if (tExampleBoxTwo != '') {
document.getElementById('txtExampleBoxTwo').value=tExampleBoxTwo;
toFinalNumberFormat(document.getElementById('txtExampleBoxTwo'));
}
}
}
</script>
</head>
<body onload='populate();'>
<div id='dall'>
<h1> Localized Currency</h1>
<h3 id='myh3'> RJM Programming - November, 2017</h3>
<h3> Thanks to <a target=_blank title='https://jwcooney.com/2016/03/26/javascript-outputting-a-number-in-traditional-currency-format/' href='https://jwcooney.com/2016/03/26/javascript-outputting-a-number-in-traditional-currency-format/'>https://jwcooney.com/2016/03/26/javascript-outputting-a-number-in-traditional-currency-format/</a><br> and <a target=_blank title='http://www.nationsonline.org/oneworld/currencies.htm' href='http://www.nationsonline.org/oneworld/currencies.htm'>http://www.nationsonline.org/oneworld/currencies.htm</a><br> and <a target=_blank title='https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx' href='https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx'>https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx</a></h3>
<br><br>
<table>
<!-- Row #1: Enter some Numeric Text Here -->
<tr>
<td> Enter your Number here </td><td> </td>
<td class="input-group"><i class="input-group-addon glyphicon glyphicon-usd"></i>
<input type="text" id="txtExampleBoxOne" class="form-control" onBlur="toFinalNumberFormat(this);" placeholder="$#,###.00" ></td>
</tr>
<!-- Row #2: Add some More Numeric Text -->
<tr>
<td> Enter another number </td><td> </td>
<td class="input-group"><i class="input-group-addon glyphicon glyphicon-usd"></i>
<input type="text" id="txtExampleBoxTwo" class="form-control" onBlur="toFinalNumberFormat(this);" placeholder="$#,###.00" ></td>
</tr>
</table>
<br><hr><br><br>
<form action='localized_currency.html' method='GET'>
International Keyboard: <select onchange="kb=this.value; document.getElementById('myh3').innerHTML=' RJM Programming - November, 2017 ... ' + mydate.toLocaleDateString(document.getElementById('keyboard').value) + ' ' + mydate.toLocaleTimeString(this.value); " id='keyboard' name='keyboard' title='Keyboard'>
<option value='af-ZA'>Afrikaans - South Africa</option>
<option value='sq-AL'>Albanian - Albania</option>
<option value='ar-DZ'>Arabic - Algeria</option>
<option value='ar-BH'>Arabic - Bahrain</option>
<option value='ar-EG'>Arabic - Egypt</option>
<option value='ar-IQ'>Arabic - Iraq</option>
<option value='ar-JO'>Arabic - Jordan</option>
<option value='ar-KW'>Arabic - Kuwait</option>
<option value='ar-LB'>Arabic - Lebanon</option>
<option value='ar-LY'>Arabic - Libya</option>
<option value='ar-MA'>Arabic - Morocco</option>
<option value='ar-OM'>Arabic - Oman</option>
<option value='ar-QA'>Arabic - Qatar</option>
<option value='ar-SA'>Arabic - Saudi Arabia</option>
<option value='ar-SY'>Arabic - Syria</option>
<option value='ar-TN'>Arabic - Tunisia</option>
<option value='ar-AE'>Arabic - United Arab Emirates</option>
<option value='ar-YE'>Arabic - Yemen</option>
<option value='hy-AM'>Armenian - Armenia</option>
<option value='Cy-az-AZ'>Azeri (Cyrillic) - Azerbaijan</option>
<option value='Lt-az-AZ'>Azeri (Latin) - Azerbaijan</option>
<option value='eu-ES'>Basque - Basque</option>
<option value='be-BY'>Belarusian - Belarus</option>
<option value='bg-BG'>Bulgarian - Bulgaria</option>
<option value='ca-ES'>Catalan - Catalan</option>
<option value='zh-CN'>Chinese - China</option>
<option value='zh-HK'>Chinese - Hong Kong SAR</option>
<option value='zh-MO'>Chinese - Macau SAR</option>
<option value='zh-SG'>Chinese - Singapore</option>
<option value='zh-TW'>Chinese - Taiwan</option>
<option value='zh-CHS'>Chinese (Simplified)</option>
<option value='zh-CHT'>Chinese (Traditional)</option>
<option value='hr-HR'>Croatian - Croatia</option>
<option value='cs-CZ'>Czech - Czech Republic</option>
<option value='da-DK'>Danish - Denmark</option>
<option value='div-MV'>Dhivehi - Maldives</option>
<option value='nl-BE'>Dutch - Belgium</option>
<option value='nl-NL'>Dutch - The Netherlands</option>
<option value='en-AU'>English - Australia</option>
<option value='en-BZ'>English - Belize</option>
<option value='en-CA'>English - Canada</option>
<option value='en-CB'>English - Caribbean</option>
<option value='en-IE'>English - Ireland</option>
<option value='en-JM'>English - Jamaica</option>
<option value='en-NZ'>English - New Zealand</option>
<option value='en-PH'>English - Philippines</option>
<option value='en-ZA'>English - South Africa</option>
<option value='en-TT'>English - Trinidad and Tobago</option>
<option value='en-GB'>English - United Kingdom</option>
<option value='en-US' select='selected'>English - United States</option>
<option value='en-ZW'>English - Zimbabwe</option>
<option value='et-EE'>Estonian - Estonia</option>
<option value='fo-FO'>Faroese - Faroe Islands</option>
<option value='fa-IR'>Farsi - Iran</option>
<option value='fi-FI'>Finnish - Finland</option>
<option value='fr-BE'>French - Belgium</option>
<option value='fr-CA'>French - Canada</option>
<option value='fr-FR'>French - France</option>
<option value='fr-LU'>French - Luxembourg</option>
<option value='fr-MC'>French - Monaco</option>
<option value='fr-CH'>French - Switzerland</option>
<option value='gl-ES'>Galician - Galician</option>
<option value='ka-GE'>Georgian - Georgia</option>
<option value='de-AT'>German - Austria</option>
<option value='de-DE'>German - Germany</option>
<option value='de-LI'>German - Liechtenstein</option>
<option value='de-LU'>German - Luxembourg</option>
<option value='de-CH'>German - Switzerland</option>
<option value='el-GR'>Greek - Greece</option>
<option value='gu-IN'>Gujarati - India</option>
<option value='he-IL'>Hebrew - Israel</option>
<option value='hi-IN'>Hindi - India</option>
<option value='hu-HU'>Hungarian - Hungary</option>
<option value='is-IS'>Icelandic - Iceland</option>
<option value='id-ID'>Indonesian - Indonesia</option>
<option value='it-IT'>Italian - Italy</option>
<option value='it-CH'>Italian - Switzerland</option>
<option value='ja-JP'>Japanese - Japan</option>
<option value='kn-IN'>Kannada - India</option>
<option value='kk-KZ'>Kazakh - Kazakhstan</option>
<option value='kok-IN'>Konkani - India</option>
<option value='ko-KR'>Korean - Korea</option>
<option value='ky-KZ'>Kyrgyz - Kazakhstan</option>
<option value='lv-LV'>Latvian - Latvia</option>
<option value='lt-LT'>Lithuanian - Lithuania</option>
<option value='mk-MK'>Macedonian (FYROM)</option>
<option value='ms-BN'>Malay - Brunei</option>
<option value='ms-MY'>Malay - Malaysia</option>
<option value='mr-IN'>Marathi - India</option>
<option value='mn-MN'>Mongolian - Mongolia</option>
<option value='nb-NO'>Norwegian (Bokmål) - Norway</option>
<option value='nn-NO'>Norwegian (Nynorsk) - Norway</option>
<option value='pl-PL'>Polish - Poland</option>
<option value='pt-BR'>Portuguese - Brazil</option>
<option value='pt-PT'>Portuguese - Portugal</option>
<option value='pa-IN'>Punjabi - India</option>
<option value='ro-RO'>Romanian - Romania</option>
<option value='ru-RU'>Russian - Russia</option>
<option value='sa-IN'>Sanskrit - India</option>
<option value='Cy-sr-SP'>Serbian (Cyrillic) - Serbia</option>
<option value='Lt-sr-SP'>Serbian (Latin) - Serbia</option>
<option value='sk-SK'>Slovak - Slovakia</option>
<option value='sl-SI'>Slovenian - Slovenia</option>
<option value='es-AR'>Spanish - Argentina</option>
<option value='es-BO'>Spanish - Bolivia</option>
<option value='es-CL'>Spanish - Chile</option>
<option value='es-CO'>Spanish - Colombia</option>
<option value='es-CR'>Spanish - Costa Rica</option>
<option value='es-DO'>Spanish - Dominican Republic</option>
<option value='es-EC'>Spanish - Ecuador</option>
<option value='es-SV'>Spanish - El Salvador</option>
<option value='es-GT'>Spanish - Guatemala</option>
<option value='es-HN'>Spanish - Honduras</option>
<option value='es-MX'>Spanish - Mexico</option>
<option value='es-NI'>Spanish - Nicaragua</option>
<option value='es-PA'>Spanish - Panama</option>
<option value='es-PY'>Spanish - Paraguay</option>
<option value='es-PE'>Spanish - Peru</option>
<option value='es-PR'>Spanish - Puerto Rico</option>
<option value='es-ES'>Spanish - Spain</option>
<option value='es-UY'>Spanish - Uruguay</option>
<option value='es-VE'>Spanish - Venezuela</option>
<option value='sw-KE'>Swahili - Kenya</option>
<option value='sv-FI'>Swedish - Finland</option>
<option value='sv-SE'>Swedish - Sweden</option>
<option value='syr-SY'>Syriac - Syria</option>
<option value='ta-IN'>Tamil - India</option>
<option value='tt-RU'>Tatar - Russia</option>
<option value='te-IN'>Telugu - India</option>
<option value='th-TH'>Thai - Thailand</option>
<option value='tr-TR'>Turkish - Turkey</option>
<option value='uk-UA'>Ukrainian - Ukraine</option>
<option value='ur-PK'>Urdu - Pakistan</option>
<option value='Cy-uz-UZ'>Uzbek (Cyrillic) - Uzbekistan</option>
<option value='Lt-uz-UZ'>Uzbek (Latin) - Uzbekistan</option>
<option value='vi-VN'>Vietnamese - Vietnam</option>
</select>
<br><br>
Style: <select onchange="soc(this);" name='st' id='st' title='Style'><option value='decimal'>Decimal</option><option value='currency' id='ihc'>Currency</option>
<option value='AFN'>Afghanistan Afghani</option>
<option value='ALL'>Albania Lek</option>
<option value='DZD'>Algerian Dinar</option>
<option value='USD'>American Samoa US Dollar</option>
<option value='EUR'>Andorra Euro</option>
<option value='AOA'>Angola Kwanza</option>
<option value='XCD'>Anguilla East Caribbean Dollar</option>
<option value='XCD'>Antigua and Barbuda East Caribbean Dollar</option>
<option value='ARS'>Argentine Peso</option>
<option value='AMD'>Armenian Dram</option>
<option value='AWG'>Aruban Guilder</option>
<option value='AUD'>Australian Dollar</option>
<option value='EUR'>Austria Euro</option>
<option value='AZN'>Azerbaijan Manat</option>
<option value='BSD'>Bahamian Dollar</option>
<option value='BHD'>Bahraini Dinar</option>
<option value='BDT'>Bangladesh Taka</option>
<option value='BBD'>Barbados Dollar</option>
<option value='BYR'>Belarusian Ruble</option>
<option value='EUR'>Belgium Euro</option>
<option value='BZD'>Belize Dollar</option>
<option value='XOF'>Benin CFA Franc BCEAO</option>
<option value='BMD'>Bermudian Dollar</option>
<option value='BTN'>Bhutan Ngultrum Indian Rupee</option>
<option value='BOB'>Bolivia Boliviano<br></option>
<option value='BAM'>Bosnia and Herzegovina Convertible Mark</option>
<option value='BWP'>Botswana Pula</option>
<option value='BRL'>Brazilian Real</option>
<option value='BND'>Brunei Darussalam Brunei Dollar</option>
<option value='BGN'>Bulgarian Lev</option>
<option value='XOF'>Burkina Faso CFA Franc BCEAO</option>
<option value='BIF'>Burundi Franc</option>
<option value='KHR'>Cambodia Riel</option>
<option value='XAF'>Cameroon CFA Franc BEAC</option>
<option value='CAD'>Canadian Dollar</option>
<option value='CVE'>Cape Verde Escudo</option>
<option value='KYD'>Cayman Islands Dollar</option>
<option value='XAF'>Central African Republic CFA Franc BEAC</option>
<option value='XAF'>Chad CFA Franc BEAC</option>
<option value='CLP'>Chilean Peso</option>
<option value='CNY'>China Renminbi Yuan</option>
<option value='AUD'>Christmas Island Australian Dollar</option>
<option value='AUD'>Cocos Keeling Islands Australian Dollar</option>
<option value='COP'>Colombian Peso</option>
<option value='KMF'>Comoro Franc</option>
<option value='CDF'>Congo, Democratic Republic Franc Congolais</option>
<option value='XAF'>Congo, Republic of CFA Franc BEAC</option>
<option value='NZD'>Cook Islands New Zealand Dollar</option>
<option value='CRC'>Costa Rican Colón</option>
<option value='XOF'>Cote D`Ivoire CFA Franc BCEAO</option>
<option value='HRK'>Croatia/Hrvatska Croatian Kuna</option>
<option value='CUP'>Cuban Peso</option>
<option value='EUR'>Cyprus Euro</option>
<option value='CZK'>Czech Koruna</option>
<option value='DKK'>Danish Krone</option>
<option value='DJF'>Djibouti Franc</option>
<option value='XCD'>Dominica East Caribbean Dollar</option>
<option value='DOP'>Dominican Peso</option>
<option value='USD'>Ecuador US Dollar</option>
<option value='EGP'>Egyptian Pound</option>
<option value='USD'>El Salvador US Dollar</option>
<option value='XAF'>Equatorial Guinea CFA Franc BEAC</option>
<option value='ERN'>Eritrea Nakfa</option>
<option value='EEK'>Estonia Euro</option>
<option value='ETB'>Ethiopian Birr</option>
<option value='FKP'>Falkland Islands Pound</option>
<option value='DKK'>Faroese Króna</option>
<option value='FJD'>Fiji Dollar</option>
<option value='EUR'>Finland Euro</option>
<option value='EUR'>France Euro</option>
<option value='EUR'>French Guiana Euro</option>
<option value='XPF'>French Polynesia CFP Franc</option>
<option value='EUR'>French Southern Territories Euro</option>
<option value='XAF'>Gabon CFA Franc BEAC</option>
<option value='GMD'>Gambia Dalasi</option>
<option value='GEL'>Georgia Lari</option>
<option value='EUR'>Germany Euro</option>
<option value='GHC'>Ghana Cedi</option>
<option value='GIP'>Gibraltar Pound</option>
<option value='EUR'>Greece Euro</option>
<option value='DKK'>Greenland Danish Krone</option>
<option value='XCD'>Grenada East Caribbean Dollar</option>
<option value='EUR'>Guadeloupe Euro</option>
<option value='USD'>Guam US Dollar</option>
<option value='GTQ'>Guatemala Quetzal</option>
<option value='GNF'>Guinea Franc</option>
<option value='GWP'>Guinea-Bissau Peso</option>
<option value='GYD'>Guyana Dollar</option>
<option value='HTG'>Haitian Gourde<br>
<option value='EUR'>Holy See Euro</option>
<option value='HNL'>Honduras Lempira</option>
<option value='HKD'>Hong Kong Dollar</option>
<option value='HUF'>Hungary Forint</option>
<option value='ISK'>Iceland Krona</option>
<option value='INR'>Indian Rupee</option>
<option value='IDR'>Indonesia Rupiah</option>
<option value='IRR'>Iranian Rial</option>
<option value='IQD'>Iraqi Dinar</option>
<option value='EUR'>Ireland Euro</option>
<option value='ILS'>Israel New Israeli Sheqel</option>
<option value='EUR'>Italy Euro</option>
<option value='JMD'>Jamaican Dollar</option>
<option value='JPY'>Japan Yen</option>
<option value='JOD'>Jordanian Dinar</option>
<option value='KZT'>Kazakhstan Tenge</option>
<option value='KES'>Kenyan Shilling</option>
<option value='AUD'>Kiribati Australian Dollar</option>
<option value='KPW'>Korea (North Korea) North Korean Won</option>
<option value='KRW'>Korea (South Korea) Won</option>
<option value='KWD'>Kuwaiti Dinar</option>
<option value='KGS'>Kyrgyzstan Som</option>
<option value='LAK'>Lao Kip</option>
<option value='EUR'>Latvia Euro</option>
<option value='LBP'>Lebanese Pound</option>
<option value='LSL'>Lesotho Loti</option>
<option value='LRD'>Liberian Dollar</option>
<option value='LYD'>Lybian Dinar</option>
<option value='CHF'>Liechtenstein Swiss Franc</option>
<option value='EUR'>Lithuania Euro</option>
<option value='EUR'>Luxembourg Euro</option>
<option value='MOP'>Macau Macanese Pataca </option>
<option value='MKD'>Macedonia, Republic of Macedonian Denar</option>
<option value='MGF'>Madagascar Malagasy Franc</option>
<option value='MWK'>Malawi Kwacha</option>
<option value='MYR'>Malaysian Ringgit</option>
<option value='MVR'>Maldives Rufiyaa</option>
<option value='XOF'>Mali CFA Franc BCEAO</option>
<option value='MTL'>Maltese Lira</option>
<option value='USD'>Marshall Islands US Dollar</option>
<option value='EUR'>Martinique Euro</option>
<option value='MRO'>Mauritania Ouguiya</option>
<option value='MUR'>Mauritius Rupee</option>
<option value='EUR'>Mayotte Euro</option>
<option value='MXN'>Mexican Peso<br>
<option value='USD'>Micronesia, Federal States of US Dollar</option>
<option value='MDL'>Moldovan Leu</option>
<option value='EUR'>Monaco Euro</option>
<option value='MNT'>Mongolia Tugrik (Tugrug)</option>
<option value='EUR'> Montenegro Euro</option>
<option value='XCD'>Montserrat East Caribbean Dollar</option>
<option value='MAD'>Moroccan Dirham</option>
<option value='MZM'>Mozambique Metical</option>
<option value='MMK'>Myanmar Kyat</option>
<option value='ZAR'>Namibia Rand Namibia Dollar</option>
<option value='AUD'>Nauru Australian Dollar</option>
<option value='NPR'>Nepalese Rupee</option>
<option value='EUR'>Netherlands Euro</option>
<option value='ANG'>Netherlands Antilles Netherlands Antillan Guilder</option>
<option value='XPF'>New Caledonia CFP Franc</option>
<option value='NZD'>New Zealand Dollar</option>
<option value='NIO'>Nicaragua Cordoba Oro</option>
<option value='XOF'>Niger CFA Franc BCEAO</option>
<option value='NGN'>Nigeria Naira</option>
<option value='NZD'>Niue New Zealand Dollar</option>
<option value='USD'>Northern Mariana Islands US Dollar</option>
<option value='NOK'>Norwegian Krone</option>
<option value='OMR'>Oman Rial Omani</option>
<option value='PKR'>Pakistan Rupee</option>
<option value='USD'>Palau US Dollar</option>
<option value='EGP'>State of Palestine Egyptian Pound</option>
<option value='PAB'>Panama Balboa</option>
<option value='PGK'>Papua New Guinea Kina</option>
<option value='PYG'>Paraguay Guarani</option>
<option value='PEN'>Peru Nuevo Sol</option>
<option value='PHP'>Philippine Peso</option>
<option value='NZD'>Pitcairn Island New Zealand Dollar</option>
<option value='PLN'>Poland Zloty</option>
<option value='EUR'>Portugal Euro</option>
<option value='USD'>Puerto Rico US Dollar</option>
<option value='QAR'>Qatari Rial</option>
<option value='EUR'>Reunion Island Euro</option>
<option value='ROL'>Romania Leu</option>
<option value='RUR'>Russian Ruble<br>
<option value='RWF'>Rwanda Franc</option>
<option value='SHP'>Saint Helena Pound</option>
<option value='XCD'>Saint Kitts and Nevis East Caribbean Dollar</option>
<option value='XCD'>Saint Lucia East Caribbean Dollar</option>
<option value='XCD'>Saint Vincent and the Grenadines East Caribbean Dollar</option>
<option value='WST'>Samoa Tala</option>
<option value='EUR'>San Marino Euro</option>
<option value='STD'>Sao Tome and Principe Dobra</option>
<option value='SAR'>Saudi Riyal</option>
<option value='XOF'>Senegal CFA Franc BCEAO</option>
<option value='CSD'>Serbian Dinar<br>
<option value='SCR'>Seychelles Rupee</option>
<option value='SLL'>Sierra Leone Leone</option>
<option value='SGD'>>Singapore Dollar</option>
<option value='EUR'>Slovakia (Slovak Republic) Euro</option>
<option value='EUR'>Slovenia Euro</option>
<option value='SBD'>Solomon Islands Dollar</option>
<option value='SOS'>Somali Shilling</option>
<option value='ZAR'>South Africa Rand</option>
<option value='SSP'>South Sudanese pound</option>
<option value='EUR'>Spain Euro</option>
<option value='LKR'>Sri Lanka Rupee</option>
<option value='SDD'>Sudanese Dinar</option>
<option value='SRG'>Suriname Guilder</option>
<option value='SZL'>Swaziland Lilangeni</option>
<option value='SEK'>Swedish Krona</option>
<option value='CHF'>Swiss Franc</option>
<option value='SYP'>Syrian Pound</option>
<option value='TWD'>Taiwan, Republic of China New Taiwan Dollar</option>
<option value='TJS'>Tajikistan Somoni</option>
<option value='TZS'>Tanzanian Shilling</option>
<option value='THB'>Thai Baht</option>
<option value='USD'>Timor Leste US Dollar</option>
<option value='XOF'>Togo CFA Franc BCEAO</option>
<option value='NZD'>Tokelau New Zealand Dollar</option>
<option value='TOP'>Tonga Paʻanga</option>
<option value='TTD'>Trinidad and Tobago Dollar</option>
<option value='TND'>Tunisian Dinar</option>
<option value='TRY'>Turkey Yeni Turk Liras</option>
<option value='TMM'>Turkmenistan Manat</option>
<option value='USD'>Turks and Caicos Islands US Dollar</option>
<option value='AUD'>Tuvalu Australian Dollar</option>
<option value='UGX'>Uganda Shilling</option>
<option value='UAH'>Ukraine Hryvnia</option>
<option value='AED'>United Arab Emirates Dirham</option>
<option value='GBP'>United Kingdom Pound Sterling</option>
<option value='USD'>United States Dollar</option>
<option value='UYU'>Uruguay Peso Uruguayo</option>
<option value='UZS'>Uzbekistan Sum</option>
<option value='VUV'>Vanuatu Vatu</option>
<option value='EUR'>Vatican City State (Holy See) Euro</option>
<option value='VEF'>Venezuelan Bolívar</option>
<option value='VND'>Vietnamese Dong</option>
<option value='USD'>Virgin Islands (British) US Dollar</option>
<option value='USD'>Virgin Islands (U.S.) US Dollar</option>
<option value='XPF'>Wallis and Futuna Islands CFP Franc</option>
<option value='MAD'>Western Sahara Moroccan Dirham</option>
<option value='YER'>Yemeni Rial</option>
<option value='ZMK'>Zambia Kwacha</option>
<option value='ZWD'>Zimbabwe Dollar</option>
</select> <input onfocus=""this.placeholder='';" onblur="this.placeholder=''; curcode=this.value; " type='text' name='ccode' id='ccode' title='Currency code (only if Currency at left)' value='' placeholder='Currency Code'></input><br><br>
Minimum Fraction Digits: <input onchange='minimumFractionDigits=this.value;' onblur='minimumFractionDigits=this.value;' min=-1 type='number' step=1 id='minFractionDigits' name='minFractionDigits' title='minimumFractionDigits' value='2'></input><br><br>
Maximum Fraction Digits: <input onchange='maximumFractionDigits=this.value;' onblur='maximumFractionDigits=this.value;' min=-1 type='number' step=1 id='maxFractionDigits' name='maxFractionDigits' title='maximumFractionDigits' value='2'></input><br><br>
<input type='hidden' name='textExampleBoxOne' id='textExampleBoxOne'></input><input type='hidden' name='textExampleBoxTwo' id='textExampleBoxTwo'></input>
<input type='submit' value='Refresh'></input>
</form>
</div>
<div id='drest'>
</div>
</body>
</html>