473,761 Members | 8,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Phone Validation Problem (I reformatted the code to make it easier to read)

<script language="JavaS cript" type="text/javascript">
<!--
function validate(theFor m)
{
var validity = true; // assume valid
if(frmComments. name.value=='' && validity == true)
{
alert('Your full name is required. Please enter your full name!');
validity = false;
frmComments.nam e.focus();
event.returnVal ue=false;
}
if(frmComments. company.value== '' && validity == true)
{
alert('Your company name is required. Please enter the name of your
company!');
validity = false;
frmComments.com pany.focus();
event.returnVal ue=false;
}
var pattern1 = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4 })+$/;
if (!pattern1.test (frmComments.em ail.value) && validity == true)
{
alert("Invalid E-mail Address! Please re-enter.")
frmComments.ema il.focus();
validity = false;
return false;
}
if(frmComments. zip.value == "" )
return true;
else
{
var pattern2 = /\d{5}/;
if(pattern2.tes t(frmComments.z ip.value))
return true;
else
{
if(!pattern2.te st(frmComments. zip.value) && validity == true)
{
alert("Invalid Zip Code! Must be in form 12345. Please re-enter.");
frmComments.zip .focus();
validity = false;
return false;
}
}
}
if(frmComments. phone.value == "")
return true;
else
{
var pattern3 = /\d{3}\-\d{3}\-\d{4}/;
if(pattern3.tes t(frmComments.p hone.value))
return true;
else
{
if(!pattern3.te st(frmComments. phone.value)&& validity == true)
{
alert("Invalid Phone Number! Must be in form 555-555-5555. Please
re-enter.");
frmComments.pho ne.focus();
validity = false;
return false;
}
}
}
}

function formSubmit()
{
window.event.re turnValue = false;
if ( confirm ( "Are you sure you want to submit?" ) )
window.event.re turnValue = true;
}
function formReset()
{
window.event.re turnValue = false;
if ( confirm( "Are you sure you want to reset?" ) )
{
frmComments.nam e.focus();
window.event.re turnValue = true;
}
}
// -->
</script>

<form id="frmComments "
action="http://matrix.csis.pac e.edu/~f03-it604-s03/cgi-bin/comments.pl"
method="post" onSubmit="retur n validate(this); " onReset="return
formReset(this) ">

<input type="submit" align="right" value="Submit" name="submit"
onclick="formSu bmit()">

-----------------------------------------------------------
This is the link to the html page:

http://matrix.csis.pace.edu/~f03-it6.../comments.html

I tried to make the code easier to read by manually formatting it by
removeing the indents and line breaks. I don't know the technique you
suggested of formatting it with a certain number of columns. Please
let me know how to do that.

I am new to this group and may do things incorrectly until learn.

I don't know if you remember my problem of:

My phone validation doesn't work within my validate function. It works
alone, but not within this function like the other validations do.

Phone is not required, but if the user enters a phone number it must
be in the form of 555-555-5555.

Also, my submit confirmation dialog box comes up first and
continuously. I want it to appear last and once before final valid
submission.

Please let me know of a correct and better way of validating these
required fields: name, company, email, and validating phone for
correct format if user fills in phone number.

Thanks for your help.
Jul 20 '05
21 6253
Lee
AnnMarie Caruso said:

Thanks for your help. When I copy my indented code from an editor like
homesite to this newsgroup it doesn't copy the same way as it is
formatted. What is the best way to copy code to this newsgroup with the
indentation intact? Thanks.


Configure your editor to use spaces instead of tabs for indentation.

Jul 20 '05 #11
In article <8y**********@h otpop.com>, lr*@hotpop.com enlightened us
with...
I happen to LOVE
x = y==3?0:1


For what?

At least make it
x= y==3?false:true ;
Then it is obvious that the values represent a boolean result, not
numbers. I have yet to see a case where the value of (...)?0:1 was
used as a number. :)


I was giving that as an example. I meant the shortcut syntax.
I use it in java tons, like
String tmpString = request.getPara meter("page");
int pg = tmpString==null ?0:Integer.pars eInt(tmpString) ;

If a value is boolean, I use true/false.

--
~kaeli~
User: The word computer professionals use when they mean
'idiot'.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #12
JRS: In article <HM************ **@merlyn.demon .co.uk>, seen in
news:comp.lang. javascript, Dr John Stockton <sp**@merlyn.de mon.co.uk>
posted at Fri, 21 Nov 2003 16:49:17 :-

One should endeavour not to repeat very similar pieces of code that can
be parameterised and put into a function; this was discussed recently,
IIRC, and needs to be revived. The general case is that the function
needs to be supplied with the name of a field, a validating RegExp
(literal), and an error message or part thereof.

The entire testing then becomes a matter of ANDing function calls;
Message-ID <X2************ **@merlyn.demon .co.uk> of 8 Nov 2003 refers,
"Validating Text box with multiple variables". That needs to be thought
about.

I have done so. The following is not quite ready to be put into,
perhaps, my js-tests.htm or elsewhere; I want to know whether the
comment marked *** being needed to balance the quotes to please W3's
TIDY is important (I expect the traditional <!-- ... --> would fix it).
Also, I want to set Chex within a function, in order to be able to
display it conveniently. It is a possible Web page, passing TIDY, which
illustrates how the checking of a simple Form can be fully
parameterised. Comment?

8<---

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML lang="en">

<HEAD><TITLE>Fo rm Validator</TITLE></HEAD><BODY>

<H3>The Validation of Straightforward Forms</H3>

The validation of simple forms can be much compacted in comparison with
the usual lengthy approach, since the validation of each field is much
the same. Where fields need further checking, for example that dates are
valid or numbers within a numeric range, specific tests can be added
after the "pattern" tests.

<p>Most fields can be usefully validated, at least initially, with a
RegExp; for example<tt> /^$|^\d{3}$/ </tt>for being either empty or
three digits.

<p>For<tt> /./ </tt>one may prefer<tt> /^\S+$/ </tt>- no blanks and at
least one character.

<p>The form below is by default correctly filled in; try the test
button, then try the effect of errors in its fields.

<form name=Frm1 action=.>
GN <input type=text name=gn value="Jim" size=13><br>
FN <input type=text name=fn value="O'Reilly Hawkins" size=23><br>
CN <input type=text name=cn value="AA12345" size=13><br>
EM <input type=text name=em value="Ji*@Trea sure.Is" size=33><br>
<input type=button name=Push value=" Test "
onClick="Ans.va lue=TryFrm(Chex )">
<input type=text name=Ans value="" size=13 readonly>
</form>

<script type="text/javascript">

with (Frm1) var Chex = [
[gn, "Given Name", "non-blank", /./],
[fn, "Family Name", "plausible" , /^[A-Z' -]{2,}$/i], // ' ???
[cn, "Crew Number", "ZZ99999", /^[A-Z]{2}\d{5}$/],
[em, "E-address", "at least a@b.c", /^.+@.+\..+$/ ]
]

// Setup(Frm1, Chex)

function TryFrm(Chx) { var J, T // Pattern test any form
for (J=0 ; J < Chx.length ; J++) { T = Chx[J]
if (!T[3].test(T[0].value)) {
alert("Error in Field #" + (J+1) + " !\n" +
"Enter your " + T[1] + " please!\n" + "It should be " + T[2])
T[0].focus()
return false }
}
return true }

</script>

<p>The exact wording of the fixed and variable parts of the alert
message will need careful crafting, dependent on the circumstances, so
that the result always reads well.

<p>For a bit more elegance and typing, make the data an array of
objects.

<br><br><hr></BODY></HTML>

--->8

With more data in the array, the form generation could be automated; but
that looks rather like going too far.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #13
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
I have done so. The following is not quite ready to be put into,
perhaps, my js-tests.htm or elsewhere; I want to know whether the
comment marked ***
I see no nothing marked "***" except right here.
.... Ah, you mean the comment marked "???" :)

being needed to balance the quotes to please W3's TIDY is important
What do you mean by "important" . I would say that only Tidy (which is
no longer W3's) would care about that quote, so it's not important
unless you need to use Tidy.

If you don't want the comment, but want to retain Tidy-compatability,
you can escape the quote in the regexp, i.e., write \' instead of '.
The regexp is equivealent.
(I expect the traditional <!-- ... --> would fix it).
Also, I want to set Chex within a function, in order to be able to
display it conveniently. It is a possible Web page, passing TIDY, which
illustrates how the checking of a simple Form can be fully
parameterised. Comment?
It looks very much like some code I have recently made, currently only
described in Danish (but the code is in Javascript and the code
comments are English, so it might be understandable anyway)
<URL:http://www.infimum.dk/HTML/validering.html >

Instead of parameterizing with regular expressions, I use general
functions that return either true or false (or a string with an
extended error message). Ofcourse, I have a function to make test
functions from regular expressions. :)
<p>The form below is by default correctly filled in; try the test
button, then try the effect of errors in its fields.

<form name=Frm1 action=.>
I would recommend an action of
action=""
instead. The "." gives the current directory in some browsers,
and probably something else in other browsers. An empty URL
fragment will point to the current file.
(I know it's just an example, just another pet peeve :)
GN <input type=text name=gn value="Jim" size=13><br>
FN <input type=text name=fn value="O'Reilly Hawkins" size=23><br>
CN <input type=text name=cn value="AA12345" size=13><br>
EM <input type=text name=em value="Ji*@Trea sure.Is" size=33><br>
<input type=button name=Push value=" Test "
onClick="Ans.va lue=TryFrm(Chex )">
<input type=text name=Ans value="" size=13 readonly>
</form>

<script type="text/javascript">

with (Frm1) var Chex = [
You assume Frm1 is a global variable pointing to the form of that name.
I would use
with (document.forms['Frm1'].elements)
although the "elements" part can probably be skipped.
[gn, "Given Name", "non-blank", /./],
[fn, "Family Name", "plausible" , /^[A-Z' -]{2,}$/i], // ' ???
[cn, "Crew Number", "ZZ99999", /^[A-Z]{2}\d{5}$/],
[em, "E-address", "at least a@b.c", /^.+@.+\..+$/ ]
]
// Setup(Frm1, Chex)

function TryFrm(Chx) { var J, T // Pattern test any form
for (J=0 ; J < Chx.length ; J++) { T = Chx[J]
if (!T[3].test(T[0].value)) {
alert("Error in Field #" + (J+1) + " !\n" +
"Enter your " + T[1] + " please!\n" + "It should be " + T[2])
T[0].focus()
return false }
You stop after the first error. Since you have all the tests available,
I would test them all and report all the errors at once. Usability-wise
that is better than having to attempt to submit for every error.
}
return true }

</script>

<p>The exact wording of the fixed and variable parts of the alert
message will need careful crafting, dependent on the circumstances, so
that the result always reads well.
If space is not that important, you could store the entire error
message, and not have to always combine it using the same template.
With more data in the array, the form generation could be automated; but
that looks rather like going too far.


Agree.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #14
JRS: In article <Kz************ **@merlyn.demon .co.uk>, seen in
news:comp.lang. javascript, Dr John Stockton <sp**@merlyn.de mon.co.uk>
posted at Fri, 21 Nov 2003 22:11:14 :-

I have done so. The following is not quite ready to be put into,
perhaps, my js-tests.htm or elsewhere;


For the time being, the page should be at <URL:http://www.merlyn.demon.
co.uk/jt.htm>; do not link to it there. That in the previous post is
substantially unchanged, but supplemented by an objectified version
with an effective way of invoking more specific tests on specific
fields, and by better text.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #15
JRS: In article <r8**********@h otpop.com>, seen in
news:comp.lang. javascript, Lasse Reichstein Nielsen <lr*@hotpop.com >
posted at Sat, 22 Nov 2003 02:46:01 :-
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
I have done so. The following is not quite ready to be put into,
perhaps, my js-tests.htm or elsewhere; I want to know whether the
comment marked ***
I see no nothing marked "***" except right here.
... Ah, you mean the comment marked "???" :)


Oops!
being needed to balance the quotes to please W3's TIDY is important


What do you mean by "important" . I would say that only Tidy (which is
no longer W3's) would care about that quote, so it's not important
unless you need to use Tidy.


I do. It finds so much that needs attention, so readily. It takes me,
after editing the source of a page, 2 clicks, 3 keystrokes, and 4
seconds overall to get a TIDY report and to see whether it is clean.
If you don't want the comment, but want to retain Tidy-compatability,
you can escape the quote in the regexp, i.e., write \' instead of '.
The regexp is equivealent.
Done. Unfortunately, I don't see how to explain, in the 8 characters
allowable in that end-of-that-line comment, why \' is used, unless the
comment contains ', which ... . OK, done it.
I would recommend an action of
action=""
instead. The "." gives the current directory in some browsers,
and probably something else in other browsers. An empty URL
fragment will point to the current file.
(I know it's just an example, just another pet peeve :)
The action has to be there to get a clean TIDY result, and for that it
needs more parameter than just "". Test now points this out. I never
use Actions.

with (Frm1) var Chex = [


You assume Frm1 is a global variable pointing to the form of that name.
I would use
with (document.forms['Frm1'].elements)
although the "elements" part can probably be skipped.


Yes, that's how I generally do it. Except that VB-dates.htm has such as
document.forms. Frm1.Yr1.value = Yr ...

Done, for the "Object Data" version, but mutated for current
circumstances. "Array Data" is obsolescent.

You stop after the first error. Since you have all the tests available,
I would test them all and report all the errors at once. Usability-wise
that is better than having to attempt to submit for every error.


That follows common usage such as earlier in the thread. I have now
done it with a third test button and a third function. OTOH, those who
make too many errors should be more careful; or the fields could be
tested onBlur using a similar but loop-less function, which needs
another Form.

<p>The exact wording of the fixed and variable parts of the alert
message will need careful crafting, dependent on the circumstances, so
that the result always reads well.


If space is not that important, you could store the entire error
message, and not have to always combine it using the same template.


I think that is near enough equivalent to making the fixed part near-
empty and putting more in the variable parts.

See, if you wish, <URL:http://www.merlyn.demo n.co.uk/jt.htm>, revised.

Thanks.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #16
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
JRS: In article <r8**********@h otpop.com>, seen in
news:comp.lang. javascript, Lasse Reichstein Nielsen <lr*@hotpop.com >
posted at Sat, 22 Nov 2003 02:46:01 :-
This "JRS:" at the start always confuzes me. I start out thinking you
are replying to yourself :)
Done. Unfortunately, I don't see how to explain, in the 8 characters
allowable in that end-of-that-line comment, why \' is used, unless the
comment contains ', which ... . OK, done it.
You did it in 7: "// \ TIDY" :)
The action has to be there to get a clean TIDY result, and for that it
needs more parameter than just "". Test now points this out. I never
use Actions.
You should! From the form element specification in HTML 4.01:
---
action %URI; #REQUIRED -- server-side form handler --
---
^^^^^^^^^!
The minimal URI fragment is the empty string. If TIDY refuses that,
"#" is usually harmless. Better yet, add an URL to a page that
explains that the previous page requires Javascript :)
See, if you wish, <URL:http://www.merlyn.demo n.co.uk/jt.htm>, revised.


Looks fine (and uncovered a bug in Opera's Function.protot ype.toString
- it didn't unparse regexp literals, but just wrote "object" in their
place).

Wrt:
---
with (document.forms[Frm]) return [
// elements: [F:Field, W:"What", H:"How", R:RegExp, ?V:ValidFn]
{F:gn, W:"Given Name", H:"non-blank", V:GNbad},
---
I recommend not referring to the elements directly, but just their name:
---
return [
// elements: [F:"FieldName" , W:"What", H:"How", R:RegExp, ?V:ValidFn]
{F:"gn", W:"Given Name", H:"non-blank", V:GNbad},
---
The advantage is that you can then create the object array before
the form has been loaded. It might not be needed, but I like to keep
the opportunity open.

Do you have any plans for handling radiobutton groups?

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #17
JRS: In article <4q**********@h otpop.com>, seen in
news:comp.lang. javascript, Lasse Reichstein Nielsen <lr*@hotpop.com >
posted at Sun, 23 Nov 2003 03:37:39 :-
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
JRS: In article <r8**********@h otpop.com>, seen in
news:comp.lang. javascript, Lasse Reichstein Nielsen <lr*@hotpop.com >
posted at Sat, 22 Nov 2003 02:46:01 :-
This "JRS:" at the start always confuzes me. I start out thinking you
are replying to yourself :)


I find it useful when someone quotes a response of mine without giving
any new attribution.

The action has to be there to get a clean TIDY result, and for that it
needs more parameter than just "". Test now points this out. I never
use Actions.


You should! From the form element specification in HTML 4.01:
---
action %URI; #REQUIRED -- server-side form handler --
---
^^^^^^^^^!
The minimal URI fragment is the empty string. If TIDY refuses that,
"#" is usually harmless. Better yet, add an URL to a page that
explains that the previous page requires Javascript :)


"#" is OK. But what I meant was that, though I set action= in forms to
please Tidy, I have no need of setting an action to be performed. My
forms do not submit, and are present for modularisation. It's something
I've never felt a need to use.

Could I use <div ID=FrmX> instead, without too many other changes?
OTOH, *this* case is an example of something that might need to be
Submitted ...
Wrt:
---
with (document.forms[Frm]) return [
// elements: [F:Field, W:"What", H:"How", R:RegExp, ?V:ValidFn]
{F:gn, W:"Given Name", H:"non-blank", V:GNbad},
---
I recommend not referring to the elements directly, but just their name:
---
return [
// elements: [F:"FieldName" , W:"What", H:"How", R:RegExp, ?V:ValidFn]
{F:"gn", W:"Given Name", H:"non-blank", V:GNbad},
---
The advantage is that you can then create the object array before
the form has been loaded. It might not be needed, but I like to keep
the opportunity open.
A disadvantage is that, for me, it does not work. Probably it requires
another document.forms[] or suchlike where F is used. Not tonight.

Do you have any plans for handling radiobutton groups?


I only use one set, in js-anclk.htm, used in function Do() - I don't see
what you are implying could be done, as they should not need validation.

--
© John Stockton, Surrey, UK. ??*@merlyn.demo n.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demo n.co.uk/> - FAQish topics, acronyms, & links.

In MS OE, choose Tools, Options, Send; select Plain Text for News and E-mail.
Jul 20 '05 #18
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
"#" is OK. But what I meant was that, though I set action= in forms to
please Tidy, I have no need of setting an action to be performed. My
forms do not submit, and are present for modularisation. It's something
I've never felt a need to use.

Could I use <div ID=FrmX> instead, without too many other changes?
Probably not.
Using a form around the input controls means:
- you can access the form using document.forms, and the controls using
form.elements. Without a form, no elements collection.
- Each control has a form property that points to the form. That makes
it easy to go from one control to another (e.g.
onclick="this.f orm.elements['otherControl'].value = 'foo';"
)
- Submit buttons makes sense, and you have somewhere to add the onsubmit
handler.
All in all, without a form element, input controls are completely
unrelated.
A disadvantage is that, for me, it does not work. Probably it requires
another document.forms[] or suchlike where F is used.
Exactly.
Do you have any plans for handling radiobutton groups?

I only use one set, in js-anclk.htm, used in function Do() - I don't see
what you are implying could be done, as they should not need validation.


You could require that one of them was checked. However, just starting
one of them out as checked would ensure that.

I have never seen the need for checkbox groups, so I can't say what
you would want to validate them for. But they work line radiobutton
groups, i.e., formRef.element s.cbgroupName gives a collection.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #19
JRS: In article <65**********@h otpop.com>, seen in
news:comp.lang. javascript, Lasse Reichstein Nielsen <lr*@hotpop.com >
posted at Mon, 24 Nov 2003 01:59:37 :-
Dr John Stockton <sp**@merlyn.de mon.co.uk> writes:
A disadvantage is that, for me, it does not work. Probably it requires
another document.forms[] or suchlike where F is used.


Exactly.


Done; and the form name string is now included in the parameter.

I see no benefit of continuing with FTry1 and PrepArr; unless someone
persuades me otherwise, I will remove them and continue only with FTry2,
FTry3 & PrepObj.

There is a new page, <URL:http://www.merlyn.demo n.co.uk/js-valid.htm>;
it can be bookmarked and linked but is not yet worth visiting for those
who know of jt.htm.

Do you have any plans for handling radiobutton groups?

I only use one set, in js-anclk.htm, used in function Do() - I don't see
what you are implying could be done, as they should not need validation.


You could require that one of them was checked. However, just starting
one of them out as checked would ensure that.


In a radio group, ISTM that one should be normally able to return to the
starting point without restoring other settings. Therefore, if "none"
is to be basically allowed, there should be an associated checkbox which
disables the group (while retaining the setting). All accessible
combinations should be valid. This presumes that one is prepared to
supply a default -- but "How many legs does your pet have? "o 0 / o 2 /
o 4 / o more / o other" might be considered not to have a reasonable
default.

I have never seen the need for checkbox groups, so I can't say what
you would want to validate them for. But they work line radiobutton
groups, i.e., formRef.element s.cbgroupName gives a collection.


In a checkbox group, it could be that only certain patterns are
permissible; for example, if they were a Hamming? code. The group can
be validated, but an individual click cannot; it seems necessary to do
three clicks at once in order to only go through valid settings.
Therefore, post-validation might be essential; but good design will
avoid it if possible.

H'mmm ... I had, as I wrote that,

f = document.forms[Chx.FN].elements[F] // F a string
if ( R && !R.test(f.value ) || ( V && V(f.value) ) )

Ah!

if ( R && !R.test(f.value ) || ( V && V(f) ) )

and each existing function V now gains an internal .value .

Where FN => f refers to checkboxes, now the programmer just has to
provide a compatible V. This will also work for grummits and oozlums,
if and when browsers implement such controls.

A crude Radiobutton validation is demonstrated.
As a list of potentially validatable controls, I have :
Those with .value (string or otherwise)
Radiobuttons
Checkboxes
Is that all?

V is now inverted; one hopes for true, not false.

It might be possible to put, as a final element of the array, at least
for FTry2,
{F:"TheForm", W:"All", H:"Right", V:FormIsOK}
where FormIsOK checks the form overall knowing that the elements are
plausible.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.
Jul 20 '05 #20

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

Similar topics

1
5209
by: Efrat Regev | last post by:
Hello, I would like to recurse through a directory and make files (which match a specific criteria) read only. From searching the Internet, I found http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303343 which shows how to change file attributes to read only using the win32api module. That's great, but I was hoping there's a more portable way to do so. Is there a more portable API call to make files read only? Many Thanks,
1
2225
by: Mike | last post by:
Hello, I can't find any javascript that reads and writes cookies with keys, so that it is compatible with ASP (I want to read and write cookies from both javascript and ASP) for example in ASP: <% Response.Cookies("user")("firstname")="John" Response.Cookies("user")("lastname")="Smith"
1
2047
by: samuelgreene | last post by:
Hello, I have a front-end access db on a server share - the users should COPY the db to their desktop - but we know how that goes. I've tried to make it read only and have denied execute permissions on the directory but it's still runs off the server - i just get the read only message in access. Does anyone have a solution? Why am I able to execute the db? Is a temporary copy being created on the desktop computer? I've noticed
4
11735
by: Srinivas Kollipara | last post by:
Hey guys, i have a small question in C#. I have a windows form which has Address fields, zip code and phone number fields. it is working fine with U.S. but i need to modify that for all the other countries. is there any way i can validate zipcode and phone numbers.... Thanks in advance. bye Srinivas
8
1786
by: goldtech | last post by:
Newbie esp about html validation - seems like something to strive for. Yet many pages even "enterprise" corporate type pages do not validate, yet seem to display well on most browsers. Two questions: 1. What is the reward, the reason to strive for a validating page? 2. Given the code snippet below which does not validate - how can accomplish the same "look" with code that does validate? Please without CSS, just html. Thanks ....
1
1136
by: Sankalp | last post by:
Hi I am writing a large program where I am using three text boxes. I am performing validation controls on these text boxes however there are some conditions Names of textboxes 1. x 2. y 3. z The conditions are
12
2889
by: tadisaus2 | last post by:
Hello, Checkbox form validation - how to make a user select 4 check boxes? I have a question of a few checkboxes and how do I require a user to check 2 checkboxes (no more, no less)? Here is my form: <input type="checkbox" name="color" id="q" value="a" />A<BR /> <input type="checkbox" name="color" id="q2" value="b" />b<BR /> <input type="checkbox" name="color" id="q3" value="c" />c<BR /> <input type="checkbox" name="color" id="q4"...
1
5904
by: jhansi | last post by:
hi... I have created a form it's working properly.... but i want to consider phone number and STD code in two different text field for a single lable phone number..... and I have considered the fields like first name,last name,Date of birth, Phone Number ,mobile number and address... 1)If i enter all the fields then only the values should enter into the database... 2) if i dint enter the mobile field then also it should save into...
1
1355
by: awigren | last post by:
I have already created a way to add new data in my database through a 3-step process. Now that I have all my methods of entering data set, I am now wondering if there is any way to make a "Read-Only" form or table to view the data, so that when others are using the database to look up information, nothing can be accidently changed. Thanks.
0
9522
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.