472,783 Members | 1,004 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Enforcing Validation based on Drop-Down choice

Hi -

I am trying to figure out a way to enforce the validation included for
this form based on whether the user chooses "email" or "phone" as the
contact choice. Right now it is set to enforce validation on both.
Is there a way to link the drop-down choice to the correspondent
validation section while disabling validation for the other one?

here's what I presently have:

<html>

<head>
<title>Contact Form</title>
<link rel="stylesheet" type="text/css" href="/end.css" />
<script language="JavaScript1.2">

//Disable select-text script (IE4+, NS6+)

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<script language="JavaScript">
<!--

/***********************************************
* Required field(s) validation
***********************************************/

function formCheck(formobj){
// Enter name of mandatory fields
var fieldRequired = Array("txtname", "txtemail", "txtphone",
"txtcountry");
// Enter field description to appear in the dialog box
var fieldDescription = Array("Full Name", "E-mail", "Phone Number",
"Country");
// dialog message
var alertMsg = "Please complete the following fields:\n";

var l_Msg = alertMsg.length;

for (var i = 0; i < fieldRequired.length; i++){
var obj = formobj.elements[fieldRequired[i]];
if (obj){
switch(obj.type){
case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text
== ""){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "select-multiple":
if (obj.selectedIndex == -1){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "text":
case "textarea":
if (obj.value == "" || obj.value == null){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
default:
}
if (obj.type == undefined){
var blnchecked = false;
for (var j = 0; j < obj.length; j++){
if (obj[j].checked){
blnchecked = true;
}
}
if (!blnchecked){
alertMsg += " - " + fieldDescription[i] + "\n";
}
}
}
}

if (alertMsg.length == l_Msg){
return true;
}else{
alert(alertMsg);
return false;
}
}
// -->
</script>

<script type="text/javascript">

/***********************************************
* Disable "Enter" key in Form script
***********************************************/

function handleEnter (field, event) {
var keyCode = event.keyCode ? event.keyCode : event.which ?
event.which : event.charCode;
if (keyCode == 13) {
var i;
for (i = 0; i < field.form.elements.length; i++)
if (field == field.form.elements[i])
break;
i = (i + 1) % field.form.elements.length;
field.form.elements[i].focus();
return false;
}
else
return true;
}

</script>

<script language = "Javascript">
/**
* DHTML phone number validation script.
*/

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{ var i;
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
}
// All characters are numbers.
return true;
}

function stripCharsInBag(s, bag)
{ var i;
var returnString = "";
// Search through string's characters one by one.
// If character is not in bag, append to returnString.
for (i = 0; i < s.length; i++)
{
// Check that current character isn't whitespace.
var c = s.charAt(i);
if (bag.indexOf(c) == -1) returnString += c;
}
return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function Validatephone(){
var Phone=document.contact.txtphone

if ((Phone.value==null)||(Phone.value=="")){
alert("Please Enter your Phone Number")
Phone.focus()
return false
}
if (checkInternationalPhone(Phone.value)==false){
alert("Please Enter a Valid Phone Number")
Phone.value=""
Phone.focus()
return false
}
return true
}
</script>

<script language = "Javascript">
/**
* DHTML email validation script.
*/

function echeck(str) {

var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(at)==-1 || str.indexOf(at)==0 ||
str.indexOf(at)==lstr){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
str.indexOf(dot)==lstr){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(at,(lat+1))!=-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.substring(lat-1,lat)==dot ||
str.substring(lat+1,lat+2)==dot){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(dot,(lat+2))==-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(" ")!=-1){
alert("You have entered an invalid E-mail address")
return false
}

return true
}

function Validateemail(){
var emailID=document.contact.txtemail

if (echeck(emailID.value)==false){
emailID.value=""
emailID.focus()
return false
}
return true
}
</script>

<script language = "Javascript">
/**
* DHTML textbox character counter (IE4+) script.
*/

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) {
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1)
taObj.value=taObj.value.substring(0,taObj.maxLengt h*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}
</script>

<style type="text/css">

..input {
background-color: #DEDEDE;
border: 1px solid;
border-top-color: #888888;
border-left-color: #888888;
border-right-color: #FFFFFF;
border-bottom-color: #FFFFFF;
color: #1D2A40;
font-family: Verdana;
}
..input2 {
background-color: #DEDEDE;
border: 1px solid;
border-top-color: #888888;
border-left-color: #888888;
border-right-color: #FFFFFF;
border-bottom-color: #FFFFFF;
color: #1D2A40;
font-family: Verdana;
}
body {
scrollbar-face-color: #2E343F;
scrollbar-shadow-color: #ACB2BC;
scrollbar-highlight-color: #ACB2BC;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #303642;
scrollbar-arrow-color: #ACB2BC;
}
</style>
</head>

<body bgcolor="#FFFFFF" body onload="" scroll="no"
style="overflow:hidden"><form id="contact" name="contact"
method="POST" action="/Scripts/submit.asp" onsubmit="return
formCheck(this);">

<script language=JavaScript>
<!--

//Disable right click script

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!docum ent.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>

<p align="center"><font size="6" face="Arial, Helvetica,
sans-serif"><b><br>
<br>
</b></font></p>
<table width="64%" border="1" cellspacing="0" cellpadding="5"
align="center" bordercolor="#003366">
<tr>
<td nowrap><font size="6" face="Arial, Helvetica,
sans-serif"><font color="05394F"><b>Contact
Form</b></font><b><font
color="#FFFFFF">-------------------------</font><img src="logo.jpg"
width="131" height="47"></b></font></td>
</tr>
</table>
<div align="center">

<table border="0" cellpadding="0" style="border-collapse: collapse;
border: 1px outset #000000; background-color: #053951" width="64%"
id="table1" cellspacing="10">
<tr>
<td width="145" height="46"><b><br>
&nbsp;<font face="Arial, Helvetica, sans-serif"
color="#FFFFFF">Name:</font></b></td>
<td height="46" nowrap><br>
<input type="text" name="txtname" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<font color="#FFFFFF" size="1"><font face="Arial, Helvetica,
sans-serif">(Press
ENTER to move between fields)</font></font> </td>
</tr>
<tr>
<td width="145" nowrap height="27"><b><font face="Arial,
Helvetica, sans-serif" color="#FFFFFF">&nbsp;Email
Address:</font></b></td>
<td height="27" nowrap>
<input type="text" name="txtemail" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';" onChange="return
Validateemail()">
</td>
</tr>
<tr>
<td width="145" nowrap><b>&nbsp;<font face="Arial, Helvetica,
sans-serif" color="#FFFFFF">Phone
Number:</font></b></td>
<td nowrap> <font color="#FFFFFF">
<input type="text" name="txtphone" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';" onChange="return
Validatephone()">
<font face="Arial, Helvetica, sans-serif" size="2"> <font
size="1">(Include
area/country code)</font></font></font></td>
</tr>
<tr>
<td width="145" nowrap><b><font color="#FFFFFF">&nbsp;<font
face="Arial, Helvetica, sans-serif">Contact
me via:</font></font></b></td>
<td width="380" nowrap>
<select name="contact" class="input" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<option selected>E-Mail</option>
<option>Phone</option>
</select>
</td>
</tr>
<tr>
<td width="145" align="left" valign="top" nowrap><b><font
face="Arial, Helvetica, sans-serif"
color="#FFFFFF">&nbsp;Country:</font></b></td>
<td>
<input type="text" name="txtcountry" size="20" maxlength="30"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="145" align="left" valign="top" nowrap
height="300"><b>&nbsp;<font face="Arial, Helvetica, sans-serif"
size="3" color="#FFFFFF">Question(s):</font></b></td>
<td height="213"> <p>
<textarea onkeypress="return taLimit()" onkeyup="return
taCount(myCounter)" rows="8" name="txtcomments" cols="39"
maxLength="255" class="input2"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';"></textarea>
<font color="#FFFFFF" size="1" face="Arial, Helvetica,
sans-serif"><br>
</font> <font color="#FFFFFF" size="1" face="Arial,
Helvetica, sans-serif">You
have <B><SPAN id=myCounter>255</SPAN></B> characters
remaining for
your comments</font></p>
<p>
<input type="submit" value="Submit Form" class=large2
name="B1" style="border: 1px outset #000000; background-color:
#F2F2F2">
<input type="reset" value="Clear Fields" class=large2
name="B2" style="border: 1px outset #000000; background-color:
#F2F2F2">
</p>
<td width="91" height="22">
</table>
</div>
</form>
<script type="text/javascript"><!--
document.contact.txtname.focus();
//--></script>
</body>

</html>
Jul 23 '05 #1
5 2524
EviL KerneL wrote:
Hi -

I am trying to figure out a way to enforce the validation included for
this form based on whether the user chooses "email" or "phone" as the
contact choice. Right now it is set to enforce validation on both.
Is there a way to link the drop-down choice to the correspondent
validation section while disabling validation for the other one?

here's what I presently have:

<html>

<head>
<title>Contact Form</title>
<link rel="stylesheet" type="text/css" href="/end.css" />
<script language="JavaScript1.2">

//Disable select-text script (IE4+, NS6+)

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<script language="JavaScript">
<!--

/***********************************************
* Required field(s) validation
***********************************************/

function formCheck(formobj){
// Enter name of mandatory fields
var fieldRequired = Array("txtname", "txtemail", "txtphone",
"txtcountry");
// Enter field description to appear in the dialog box
var fieldDescription = Array("Full Name", "E-mail", "Phone Number",
"Country");
// dialog message
var alertMsg = "Please complete the following fields:\n";

var l_Msg = alertMsg.length;

for (var i = 0; i < fieldRequired.length; i++){
var obj = formobj.elements[fieldRequired[i]];
if (obj){
switch(obj.type){
case "select-one":
if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text
== ""){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "select-multiple":
if (obj.selectedIndex == -1){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
case "text":
case "textarea":
if (obj.value == "" || obj.value == null){
alertMsg += " - " + fieldDescription[i] + "\n";
}
break;
default:
}
if (obj.type == undefined){
var blnchecked = false;
for (var j = 0; j < obj.length; j++){
if (obj[j].checked){
blnchecked = true;
}
}
if (!blnchecked){
alertMsg += " - " + fieldDescription[i] + "\n";
}
}
}
}

if (alertMsg.length == l_Msg){
return true;
}else{
alert(alertMsg);
return false;
}
}
// -->
</script>

<script type="text/javascript">

/***********************************************
* Disable "Enter" key in Form script
***********************************************/

function handleEnter (field, event) {
var keyCode = event.keyCode ? event.keyCode : event.which ?
event.which : event.charCode;
if (keyCode == 13) {
var i;
for (i = 0; i < field.form.elements.length; i++)
if (field == field.form.elements[i])
break;
i = (i + 1) % field.form.elements.length;
field.form.elements[i].focus();
return false;
}
else
return true;
}

</script>

<script language = "Javascript">
/**
* DHTML phone number validation script.
*/

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{ var i;
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) return false;
}
// All characters are numbers.
return true;
}

function stripCharsInBag(s, bag)
{ var i;
var returnString = "";
// Search through string's characters one by one.
// If character is not in bag, append to returnString.
for (i = 0; i < s.length; i++)
{
// Check that current character isn't whitespace.
var c = s.charAt(i);
if (bag.indexOf(c) == -1) returnString += c;
}
return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function Validatephone(){
var Phone=document.contact.txtphone

if ((Phone.value==null)||(Phone.value=="")){
alert("Please Enter your Phone Number")
Phone.focus()
return false
}
if (checkInternationalPhone(Phone.value)==false){
alert("Please Enter a Valid Phone Number")
Phone.value=""
Phone.focus()
return false
}
return true
}
</script>

<script language = "Javascript">
/**
* DHTML email validation script.
*/

function echeck(str) {

var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(at)==-1 || str.indexOf(at)==0 ||
str.indexOf(at)==lstr){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 ||
str.indexOf(dot)==lstr){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(at,(lat+1))!=-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.substring(lat-1,lat)==dot ||
str.substring(lat+1,lat+2)==dot){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(dot,(lat+2))==-1){
alert("You have entered an invalid E-mail address")
return false
}

if (str.indexOf(" ")!=-1){
alert("You have entered an invalid E-mail address")
return false
}

return true
}

function Validateemail(){
var emailID=document.contact.txtemail

if (echeck(emailID.value)==false){
emailID.value=""
emailID.focus()
return false
}
return true
}
</script>

<script language = "Javascript">
/**
* DHTML textbox character counter (IE4+) script.
*/

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) {
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1)
taObj.value=taObj.value.substring(0,taObj.maxLengt h*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}
</script>

<style type="text/css">

.input {
background-color: #DEDEDE;
border: 1px solid;
border-top-color: #888888;
border-left-color: #888888;
border-right-color: #FFFFFF;
border-bottom-color: #FFFFFF;
color: #1D2A40;
font-family: Verdana;
}
.input2 {
background-color: #DEDEDE;
border: 1px solid;
border-top-color: #888888;
border-left-color: #888888;
border-right-color: #FFFFFF;
border-bottom-color: #FFFFFF;
color: #1D2A40;
font-family: Verdana;
}
body {
scrollbar-face-color: #2E343F;
scrollbar-shadow-color: #ACB2BC;
scrollbar-highlight-color: #ACB2BC;
scrollbar-3dlight-color: #000000;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: #303642;
scrollbar-arrow-color: #ACB2BC;
}
</style>
</head>

<body bgcolor="#FFFFFF" body onload="" scroll="no"
style="overflow:hidden"><form id="contact" name="contact"
method="POST" action="/Scripts/submit.asp" onsubmit="return
formCheck(this);">

<script language=JavaScript>
<!--

//Disable right click script

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!docum ent.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>

<p align="center"><font size="6" face="Arial, Helvetica,
sans-serif"><b><br>
<br>
</b></font></p>
<table width="64%" border="1" cellspacing="0" cellpadding="5"
align="center" bordercolor="#003366">
<tr>
<td nowrap><font size="6" face="Arial, Helvetica,
sans-serif"><font color="05394F"><b>Contact
Form</b></font><b><font
color="#FFFFFF">-------------------------</font><img src="logo.jpg"
width="131" height="47"></b></font></td>
</tr>
</table>
<div align="center">

<table border="0" cellpadding="0" style="border-collapse: collapse;
border: 1px outset #000000; background-color: #053951" width="64%"
id="table1" cellspacing="10">
<tr>
<td width="145" height="46"><b><br>
&nbsp;<font face="Arial, Helvetica, sans-serif"
color="#FFFFFF">Name:</font></b></td>
<td height="46" nowrap><br>
<input type="text" name="txtname" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<font color="#FFFFFF" size="1"><font face="Arial, Helvetica,
sans-serif">(Press
ENTER to move between fields)</font></font> </td>
</tr>
<tr>
<td width="145" nowrap height="27"><b><font face="Arial,
Helvetica, sans-serif" color="#FFFFFF">&nbsp;Email
Address:</font></b></td>
<td height="27" nowrap>
<input type="text" name="txtemail" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';" onChange="return
Validateemail()">
</td>
</tr>
<tr>
<td width="145" nowrap><b>&nbsp;<font face="Arial, Helvetica,
sans-serif" color="#FFFFFF">Phone
Number:</font></b></td>
<td nowrap> <font color="#FFFFFF">
<input type="text" name="txtphone" size="20" maxlength="50"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';" onChange="return
Validatephone()">
<font face="Arial, Helvetica, sans-serif" size="2"> <font
size="1">(Include
area/country code)</font></font></font></td>
</tr>
<tr>
<td width="145" nowrap><b><font color="#FFFFFF">&nbsp;<font
face="Arial, Helvetica, sans-serif">Contact
me via:</font></font></b></td>
<td width="380" nowrap>
<select name="contact" class="input" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<option selected>E-Mail</option>
<option>Phone</option>
</select>
</td>
</tr>
<tr>
<td width="145" align="left" valign="top" nowrap><b><font
face="Arial, Helvetica, sans-serif"
color="#FFFFFF">&nbsp;Country:</font></b></td>
<td>
<input type="text" name="txtcountry" size="20" maxlength="30"
class="input" style="border: 1px outset #000000" onkeypress="return
handleEnter(this, event)"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';">
<p>&nbsp;</p>
</td>
</tr>
<tr>
<td width="145" align="left" valign="top" nowrap
height="300"><b>&nbsp;<font face="Arial, Helvetica, sans-serif"
size="3" color="#FFFFFF">Question(s):</font></b></td>
<td height="213"> <p>
<textarea onkeypress="return taLimit()" onkeyup="return
taCount(myCounter)" rows="8" name="txtcomments" cols="39"
maxLength="255" class="input2"
onfocus="this.style.backgroundColor='#66FFFF';"
onblur="this.style.backgroundColor='#DEDEDE';"></textarea>
<font color="#FFFFFF" size="1" face="Arial, Helvetica,
sans-serif"><br>
</font> <font color="#FFFFFF" size="1" face="Arial,
Helvetica, sans-serif">You
have <B><SPAN id=myCounter>255</SPAN></B> characters
remaining for
your comments</font></p>
<p>
<input type="submit" value="Submit Form" class=large2
name="B1" style="border: 1px outset #000000; background-color:
#F2F2F2">
<input type="reset" value="Clear Fields" class=large2
name="B2" style="border: 1px outset #000000; background-color:
#F2F2F2">
</p>
<td width="91" height="22">
</table>
</div>
</form>
<script type="text/javascript"><!--
document.contact.txtname.focus();
//--></script>
</body>

</html>

For a mutually exclusive choice, why not use a radio button group instead?
Mick
Jul 23 '05 #2
JRS: In article <%B*******************@twister.nyroc.rr.com>, seen in
news:comp.lang.javascript, Mick White <mw******@BOGUSrochester.rr.com>
posted at Mon, 7 Jun 2004 14:04:43 :
Lines: 460
... ... ... ...

For a mutually exclusive choice, why not use a radio button group instead?
Mick


See FAQ, sec 2.3, para 6, first injunction.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #3
Dr John Stockton wrote:
JRS: In article <%B*******************@twister.nyroc.rr.com>, seen in
news:comp.lang.javascript, Mick White <mw******@BOGUSrochester.rr.com>
posted at Mon, 7 Jun 2004 14:04:43 :

Lines: 460
... ... ... ...


For a mutually exclusive choice, why not use a radio button group instead?
Mick

See FAQ, sec 2.3, para 6, first injunction.


And your point?
Mick

Jul 23 '05 #4
Mick White wrote:
Dr John Stockton wrote:
Mick White wrote: <snip>
For a mutually exclusive choice, why not use a radio
button group instead?
Mick


See FAQ, sec 2.3, para 6, first injunction.


And your point?


14KB post containing only 14 additional words, all of which appeared to
be directly in response to the first paragraph of the original post.
Trimming out quoted material that is not being directly commented upon
is normal practice and reduces bandwidth and storage requirements for
everyone using the group (and all the news servers carrying it). And it
also reduces the need to scroll through masses of text and code looking
for comments that are not there.

Richard.
Jul 23 '05 #5
Richard Cornford wrote:
Mick White wrote:
<snip>
For a mutually exclusive choice, why not use a radio
button group instead?
Mick

See FAQ, sec 2.3, para 6, first injunction.


And your point?

14KB post containing only 14 additional words, <snip>


I ask Tweedledee, and Tweedledum answers.
But point is taken,
Mick

Jul 23 '05 #6

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

Similar topics

4
by: Geoff Soper | last post by:
I've been looking for a simple way of checking that a string is an e-mail address. I don't need to check if the address exists, just if the format of the string matches. There seem to be lots of...
3
by: Xamle Eng | last post by:
I am looking for a data oriented schema-enforcing XML editor. By schema-enforcing I mean an editor that doesn't just have a button to verify the schema - I want an editor that actively enforces it...
2
by: Frosty | last post by:
Howto make datagrid enforce rules of xml schema? Created xml schema in the designer. Constraints created there using the following <xs:simpleType name="zipcode"><xs:restriction...
6
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No...
5
by: M | last post by:
Hi, it's possible to append a custom action to a client-side verification of a validation control ? I have a validator summary control that shows (automatically) a message box if the validation...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
2
by: Tim Frawley | last post by:
Source code attached indicates my problem with validation and a button bar save button. Fill the Textbox with some text then tab off the control. The message box will display the text in the...
1
by: Thelma Lubkin | last post by:
I have a form w/ 11 identical text boxes in each of which user can enter a number between 1 and 11. Each defaults to 0, which I use to flag empty. Each has the 1 to 11 restriction as its validation...
12
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.