PDA

View Full Version : Formatting Textbox Values



johnnyi
04-26-2005, 04:41 PM
Howdy all,

I have an HTM page with a grid of textboxes into which I am feeding values from an MDX query (querying from Analysis Services cubes). The values populate into the textboxes just fine, however I can't figure out how to format the returned values to (i.e.) a percentage. For example, a retrieved value returns as: .87804878. Does anyone know of a JavaScript that I could use to display the contents of this textbox as 87.80%? [with two fixed decimal places].
I'm also looking for a similar conversion for displaying seconds (i.e. - 485.59581) as time - such as mm:ss (485.59581 would display as 8:06).

I appreciate any assistance you could provide,

- i

johnnyi
05-05-2005, 04:58 PM
Geez - don't all rush to answer at once!! :D

Anyways - I've figured it out. If anyone is interested, just PM me and I'll be glad to share.