473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

validate fields when a dynamic checkbox is selected

Hi All!

I am trying to make several fields in a HTML form validated, but only
when a dynamic checkbox is selected. I am not sure how to do this.

Here is a snippet of the dynamic checkbox code:
<%
Set RSLIST = Server.CreateObject("ADODB.Recordset")
SQLLIST = "SELECT * FROM Newsletters ORDER BY Newsletter_Name"
RSLIST.Open SQLLIST, Conn, 1, 3
%>
<%Do While Not RSLIST.EOF%>
<input type="checkbox" name="Newsletters"
value="<%=RSLIST("ID")%>"><%=RSLIST("Newsletter_Na me")%>

I would like to make three fields (company, phone_work, license)
mandatory when one of the "ID" (i.e. ID 2) is checked.

Please advise. Thanks for any assistance.

---
Bobby

Oct 3 '05 #1
1 1673
bobby1041 wrote on 03 okt 2005 in comp.lang.javascript:
Hi All!


Please do not multipost on usenet.

Crosposting is possible when appropriate.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kumar | last post by:
Hi , I am using the article code shown in below url: http://www.codeproject.com/aspnet/xmlxsltransformer.asp?df=100&forumid=118504&select=1170328 This article is very cool feature. I...
1
by: bobby1041 | last post by:
Hi All! I am trying to make several fields in a HTML form validated, but only when a dynamic checkbox is selected. I am not sure how to do this. Here is a snippet of the dynamic checkbox...
2
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button...
3
by: tom-co | last post by:
Hi. I am using this code so that when a checkbox is selected it populates two separate textfields with the word "No". <script type="text/javascript"><!-- function setField(what) { if...
9
by: Jimbo | last post by:
Hello, I have a user request to build a form in an Access database where the user can check off specific fields to pull in a query. For example, let's say I have 10 fields in a table. The user...
5
by: phpCodeHead | last post by:
I am needing to determine how to go about validating that a field in my form contains only a positive integer. I know that this is fairly simple if the form contains only one element to be...
1
by: anilareddy | last post by:
I have an application like this. I need to validate the start time in 2nd row against the start row in first row. I mean The start time value entered in the second row must not b the value entered in...
37
by: viki1967 | last post by:
Hi all. I have this simple form. I need if checkbox C_1 is selected: 1) field name="n_1" is required and accept only numbers; 2) field name="n_2" is required and accept only numbers; I...
482
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. ...
45
by: dizzydangler | last post by:
Hi, I'm new to access (2007, running on XP), but I've gotten some great help from this site on my project so far. However, the more I know, the more complex the problems seem to become.... I'm...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.