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

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 September 20th, 2009, 07:11 PM
grabit13 grabit13 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2009
Posts: 3 grabit13 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 46 sec
Reputation Power: 0
JS validation Guru PLEASE !!

Hi Folks
Can I do the following please:
In have a form for entering payments of invoices.
If they pay the whole ammount that is ok BUT if they only pay a part payment i wanna do the following.
On the form i have radion buttons (partpay yes & no) - I have the validation in place where they must select one or the other.
If they select yes i want an alert to show "enter this part payment in paidnotes" - This paid notes is a field also in the form.
This field however could already contain text about a previous payment.
What i need to do is send the focus of the "yes" radiobutton to the "paidnotes" field then check that they actually enter some text into that field - whether or not text already exists or not.

As far as i can make out this would be an "onchange" event but i do not have the experience to understand just how to do it.

Sorta like (in Plain english)
if yes is checked - make sure they type sumpin into the textbox "paidnotes" whether it already contains text or not.

The js validation i already have in place is (onsubmit)
if(!document.form1.partpay[0].checked && !document.form1.partpay[1].checked){
alert("Is this A Part Payment or Not?")
return false
}
if(document.form1.partpay[0].checked){
alert("DON'T FORGET To Record this Part Payment into the 'Part Payment Notes' Field");
document.form1.paidnotes.focus();
return false
}


PS "paidnotes" is a textbox field

Can anyone please help me with this.
cheers and thanks in advance
Grabit

Reply With Quote
  #2  
Old September 21st, 2009, 12:45 PM
kiteless kiteless is offline
Moderator
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 4,275 kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level)kiteless User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 2 Weeks 6 h 56 m 26 sec
Reputation Power: 896
You may get a better response by asking this in the JavaScript forum, since that is dedicated to this sort of topic. Also, there are a number of existing validation libraries available (many as plugins to things like jQuery) that will probably do much more than anything you try to build up yourself.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > JS validation Guru PLEASE !!


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 5 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek