Last active
December 18, 2015 12:29
-
-
Save tparton42/5783173 to your computer and use it in GitHub Desktop.
YUI DataTable and Non-US Currency Formats - code sample for embedded JavaScript in PHP file.
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
<script language="javascript"> | |
// Set your DataTable configuration, in your onLoad event | |
var myConfigs = { | |
currencyOptions : { | |
prefix: '<?php echo $this->currency->getSymbol($this->currency->getLocale()); ?>' | |
, decimalPlaces:2 | |
, decimalSeparator:"." | |
, thousandsSeparator:"," | |
} | |
}; | |
// Init your data table | |
this.myDataTable = new YAHOO.widget.DataTable("basic", myColumnDefs, this.myDataSource, myConfigs); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment