All pastes #908772 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-18 18:44 UTC
rendered paste body
function numToWord(tree, numField, ltrField)
{
	// Assign nodes to variables
	var priceNum = XDocument.DOM.selectSingleNode("/my:Global/my:" + tree + "/my:" + numField);
	var priceLtr = XDocument.DOM.selectSingleNode("/my:Global/my:" + tree + "/my:" + ltrField);
	                                              
	// If it's not empty, convert the field to words
	if (priceNum.text != "")
		priceLtr.text = toWords(priceNum.text);
}

function makeDate(field)
{
	numToWord("_Dates",field,field + "_");
}

** called via **
makeDate("field123");