decimal places

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SusieQ

    decimal places

    Hi All
    can anyone tell me the easiest way to make sure numbers get passed with 2
    decimal places?

    ie:
    <select name="TagCost" id="TagCost">
    <option value="25.00">1 @ 25.00</option>
    <option value="50.00">2 @ 25.00</option>
    </select>

    fprice=request( "TagCost") <------- need to make sure this is 25.00 not 25

    TIA






  • Curt_C [MVP]

    #2
    Re: decimal places

    1) dont use Request() use Request.Form()/Request.QuerySt ring()/etc. Wont
    effect the outcome but it's propper.
    2) it will come through as that value unless you run a convertion on it to
    something else. ensure your decimals by doing a convert to dec.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "SusieQ" <rh@bloofrog.ne t> wrote in message
    news:%23DYbKIRw EHA.2172@TK2MSF TNGP14.phx.gbl. ..[color=blue]
    > Hi All
    > can anyone tell me the easiest way to make sure numbers get passed with 2
    > decimal places?
    >
    > ie:
    > <select name="TagCost" id="TagCost">
    > <option value="25.00">1 @ 25.00</option>
    > <option value="50.00">2 @ 25.00</option>
    > </select>
    >
    > fprice=request( "TagCost") <------- need to make sure this is 25.00 not
    > 25
    >
    > TIA
    >
    >
    >
    >
    >
    >[/color]


    Comment

    Working...