Re: OT: Prevent form submission if radio button and text field are not filled out

2005-11-25 Thread Massimo Foti
Writing ad hoc JavaScript code for form validation isn't a great idea in my
opinion. You could investigate using a library like the ones below:

http://www.massimocorner.com/validator/
http://www.pengoworks.com/index.cfm?action=get:qforms


Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225227
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: Prevent form submission if radio button and text field are not filled out

2005-11-22 Thread Bobby Hartsfield
function testPayMethod()
{
f = document.payform;
var radioCheck = false;

var firstEl = 0;
var lastEl = 3;

for (i=firstEl;i's onsubmit
this...

Onsubmit="return testPayMethod();"

The firstEl is the position of the first radio button and lastEl is the
position of the last radio button. Should make it easier to move the radios
around in the form or add more later.

This is probably gonna come through all garbled but ill give it a shot. :/

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com

-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 22, 2005 5:22 PM
To: CF-Talk
Subject: RE: OT: Prevent form submission if radio button and text field are
not filled out

Well, I'm not really sure what I'm saying. I just need for the form to
submit if both of the criteria are met. If you select one of the bottom two,
the full form works just fine.



-Original Message-
From: Kiley Simpson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 4:18 PM
To: CF-Talk
Subject: Re: OT: Prevent form submission if radio button and text field
are not filled out


Are you saying you need a DHTML script to reactivate the submit button if
the Troop T.E.N. value is not null and either Troop radio button is
selected?

At 03:02 PM 11/22/2005, you wrote:
>Anyone have any ideas?
>
>I've cut out a portion of a form on which I'm working:
>http://www.andyandjaime.com/uploads/radiojs.html
>
>It's supposed to pop an alert box (and disable the form) when you click
>"check out" IF
>a) You've got either of the top two options (troop check or troop debit)
>selected
>AND
>b) The tax exempt number is not filled in
>
>This part works fine, but it's ALSO supposed to reactivate the form once
>you've filled both of those requirements and it's not doing that.
>
>Does anyone have any ideas as to what's wrong? I'm sure it's something
>simple, but I don't know what it might be.
>
>andy matthews
>web developer
>ICGLink, Inc.
>[EMAIL PROTECTED]
>615.370.1530 x737
>--//->
>
>
>





~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225032
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: Prevent form submission if radio button and text field are not filled out

2005-11-22 Thread Andy Matthews
Well, I'm not really sure what I'm saying. I just need for the form to
submit if both of the criteria are met. If you select one of the bottom two,
the full form works just fine.



-Original Message-
From: Kiley Simpson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 4:18 PM
To: CF-Talk
Subject: Re: OT: Prevent form submission if radio button and text field
are not filled out


Are you saying you need a DHTML script to reactivate the submit button if
the Troop T.E.N. value is not null and either Troop radio button is
selected?

At 03:02 PM 11/22/2005, you wrote:
>Anyone have any ideas?
>
>I've cut out a portion of a form on which I'm working:
>http://www.andyandjaime.com/uploads/radiojs.html
>
>It's supposed to pop an alert box (and disable the form) when you click
>"check out" IF
>a) You've got either of the top two options (troop check or troop debit)
>selected
>AND
>b) The tax exempt number is not filled in
>
>This part works fine, but it's ALSO supposed to reactivate the form once
>you've filled both of those requirements and it's not doing that.
>
>Does anyone have any ideas as to what's wrong? I'm sure it's something
>simple, but I don't know what it might be.
>
>andy matthews
>web developer
>ICGLink, Inc.
>[EMAIL PROTECTED]
>615.370.1530 x737
>--//->
>
>
>



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225029
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: Prevent form submission if radio button and text field are not filled out

2005-11-22 Thread Kiley Simpson
Are you saying you need a DHTML script to reactivate the submit button if 
the Troop T.E.N. value is not null and either Troop radio button is selected?

At 03:02 PM 11/22/2005, you wrote:
>Anyone have any ideas?
>
>I've cut out a portion of a form on which I'm working:
>http://www.andyandjaime.com/uploads/radiojs.html
>
>It's supposed to pop an alert box (and disable the form) when you click
>"check out" IF
>a) You've got either of the top two options (troop check or troop debit)
>selected
>AND
>b) The tax exempt number is not filled in
>
>This part works fine, but it's ALSO supposed to reactivate the form once
>you've filled both of those requirements and it's not doing that.
>
>Does anyone have any ideas as to what's wrong? I'm sure it's something
>simple, but I don't know what it might be.
>
>andy matthews
>web developer
>ICGLink, Inc.
>[EMAIL PROTECTED]
>615.370.1530 x737
>--//->
>
>
>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225027
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54