ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 29th, 2004, 11:14 AM
densma densma is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 37 densma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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?

Reply With Quote
  #2  
Old January 29th, 2004, 11:28 AM
jstrohofer jstrohofer is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Cincinnati, OH USA
Posts: 111 jstrohofer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 3 sec
Reputation Power: 6
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

Reply With Quote
  #3  
Old January 29th, 2004, 12:42 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 9
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

Reply With Quote
  #4  
Old January 29th, 2004, 01:27 PM
densma densma is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 37 densma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
datatype is "money" should i change it to numeric?

Last edited by densma : January 29th, 2004 at 01:40 PM.

Reply With Quote
  #5  
Old January 29th, 2004, 01:30 PM
densma densma is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 37 densma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
jstrohofer

does that formula goes to database? server or client side?

Reply With Quote
  #6  
Old January 29th, 2004, 01:34 PM
densma densma is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 37 densma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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

Reply With Quote
  #7  
Old January 29th, 2004, 02:38 PM
WisconsinGuy's Avatar
WisconsinGuy WisconsinGuy is offline
I thank you very little
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2003
Location: Milwaukee, WI
Posts: 1,028 WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level)WisconsinGuy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 35 m 41 sec
Reputation Power: 9
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > form options


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT