Skip to content

Instantly share code, notes, and snippets.

@tparton42
Last active December 18, 2015 12:29
Show Gist options
  • Save tparton42/5783173 to your computer and use it in GitHub Desktop.
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.
<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