|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
form options
i have radio button and values of "yes" and "No" on the form.
how do i make "No" default value. no nothing is selected by default(now) second i want to make textbox format for amount or money..if somebody type 12 should be sumbited in database as $12.00 or 1214 should be sumbited as $12.04 any idea? |
|
#2
|
|||
|
|||
|
Let's say you have your radio buttons below. In the one with a value of "NO", you'd want to just type in "checked" in the HTML.
For example: <input type="radio" name="myRadio" value="No" checked> NO <input type="radio" name="myRadio" value="Yes"> YES For your second issue, I'd recommend looking into the FormatCurrency function: http://www.devguru.com/Technologies...atcurrency.html Hope that helps! --Jill |
|
#3
|
||||
|
||||
|
What datatype is your database for the currency?Character or Number?
I would recommend Number and not put the $ in the database, only show it on the client side. Also, Format(number, decimal places) will show 12 as 12.00 Good Luck |
|
#4
|
|||
|
|||
|
datatype is "money" should i change it to numeric?
Last edited by densma : January 29th, 2004 at 01:40 PM. |
|
#5
|
|||
|
|||
|
jstrohofer
does that formula goes to database? server or client side? |
|
#6
|
|||
|
|||
|
i would prefer to be able to validate on client side. force user to type in $00.00 before submiting the form
where 00.00 can be any number from 0-9 that all digits require for this project how can i do this? if possible |
|
#7
|
||||
|
||||
|
If you want to check clients side, JavaScript has a built in function which is: isNumeric I believe it returns a boolean.
Personally, I like to stay away from type "money", I perfer a numerical, just a preference. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > form options |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|