> good news: it was easy to reproduce. bad news: i'm having difficulty
> isolating the problem. a workaround that may or may not help you is
> to use something like a checkbox list. i'm a bit baffled right now
so
> it may take me some time to figure out what i hosed up.
Any progress at all? Unfortunately I don't have the screen space to
use a checkbox list as there are a lot of options in each dropdown and
several dropdowns on the page. So a fix would be most welcome.
In fact the fields in question do not actually require validation, so
if you were able to allow multiple selection with validation disabled
for those fields then that would be a possible work around for me in
the short term.
Graham
good news: it was easy to reproduce. bad news: i'm having difficulty
isolating the problem. a workaround that may or may not help you is
to use something like a checkbox list. i'm a bit baffled right now so
it may take me some time to figure out what i hosed up.
--- In validation@yahoogroups.com, "Graham Howe" <graham@...> wrote:
>
> 3.1.4 although the problem was first seen with 3.1.0
>
> Graham
>
> --- In validation@yahoogroups.com, "somematt" <matthew.a.frank@>
> wrote:
> >
> > can you tell me which version you're using?
> >
>
3.1.4 although the problem was first seen with 3.1.0
Graham
--- In validation@yahoogroups.com, "somematt" <matthew.a.frank@...>
wrote:
>
> can you tell me which version you're using?
>
can you tell me which version you're using?
--- In validation@yahoogroups.com, "Graham Howe" <graham@...> wrote:
>
> I have been using your excellent validation script for some time
> without any problems, but have found a problem when using the latest
> versions of browsers. IE7 beta, Opera 9.0 and Firefox 1.5 all have the
> same problem and yet IE6 and IE5.5 work perfectly.
>
> There are no errors reported but when multiple items in a multiple
> select list are selected, only the first selected items is actually
> passed across. It doesn't matter whether the form action is GET or
> POST, still only the first selected item comes through.
>
> If I comment out the call to this.setup(); in the code then the
> multiple values do get passed across without problem so this is
> certainly caused by something in the script.
>
> Any suggestions would be most appreciated.
>
I have been using your excellent validation script for some time
without any problems, but have found a problem when using the latest
versions of browsers. IE7 beta, Opera 9.0 and Firefox 1.5 all have the
same problem and yet IE6 and IE5.5 work perfectly.
There are no errors reported but when multiple items in a multiple
select list are selected, only the first selected items is actually
passed across. It doesn't matter whether the form action is GET or
POST, still only the first selected item comes through.
If I comment out the call to this.setup(); in the code then the
multiple values do get passed across without problem so this is
certainly caused by something in the script.
Any suggestions would be most appreciated.
looks like a bug alright. i must have changed the name of the
variable in only part of the function. i'll be sure to add a test
case for it to my JsUnit test suite. it looks like the fix is just to
change "setElement" to "element" in that function.
--- In validation@yahoogroups.com, "itnetx_chris" <chris.jade@g...> wrote:
>
> Using version 3.2.0 (beta)
>
> My code:
> <html>
> <head>
> <link href="../style.css" rel="stylesheet" type="text/css">
> </head>
> <body>
> <form name="form1" method="POST">
> <input class="form" name="test" type="text" id="test" size="20"
> maxlength="20" display-name="Test" required="on"></td>
> <select class="form" id="blah" name="blah" style="width:200">
> <option value="None">None</option>
> </select>
> <input class="form" type="submit" name="Submit" value="Submit">
> </form>
> <script src="/validation3/validation.js" language="JScript"></script>
> <script type="text/javascript">Validation.showPopup = true;</script>
> </body>
> </html>
>
> Generates the following error:
> Line: 694
> Char: 5
> Error: 'setElement' is underfined
> Code: 0
> ...
>
> If I take out the class="form" in both the SELECT and INPUT button, I
> do not get the error.
>
> No error is generated when it is in the first SELECT box (text input).
>
> TIA,
> Chris
>
> (Keep up the good work - I love the changes in this new version!)
>
unfortunately, that behavior is by design. the "isValidElement"
private method specifically prevents validation on disabled and
readonly elements. you have a number of options for doing the
validation you want. the easiest is probably to operate on the
validation script directly and remove the readOnly check.
there's also a hook for performing operations before and after
validation for an entire form. you /could/ turn readOnly off and on
again that way.
--- In validation@yahoogroups.com, "itnetx_chris" <chris.jade@g...> wrote:
>
> Is it possible to validate read only fields? I am using a pop-up window
> to change the contents of a text field, and wish to validate it
> as "required".
>
> When I include readonly="true", the field does not seem to be validated.
>
> I am using version 3.1.4.
>
> <form name="incident" method="POST" action="" validate-onchange="false"
> invalid-color="yellow" mark="true">
> <input name="proj_name" type="text" class="form" id="proj_name"
> value="" size="50" maxlength="50" required="true" readonly="true">
>
> Cheers
> Chris
>
Using version 3.2.0 (beta)
My code:
<html>
<head>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="form1" method="POST">
<input class="form" name="test" type="text" id="test" size="20"
maxlength="20" display-name="Test" required="on"></td>
<select class="form" id="blah" name="blah" style="width:200">
<option value="None">None</option>
</select>
<input class="form" type="submit" name="Submit" value="Submit">
</form>
<script src="/validation3/validation.js" language="JScript"></script>
<script type="text/javascript">Validation.showPopup = true;</script>
</body>
</html>
Generates the following error:
Line: 694
Char: 5
Error: 'setElement' is underfined
Code: 0
...
If I take out the class="form" in both the SELECT and INPUT button, I
do not get the error.
No error is generated when it is in the first SELECT box (text input).
TIA,
Chris
(Keep up the good work - I love the changes in this new version!)
Is it possible to validate read only fields? I am using a pop-up window
to change the contents of a text field, and wish to validate it
as "required".
When I include readonly="true", the field does not seem to be validated.
I am using version 3.1.4.
<form name="incident" method="POST" action="" validate-onchange="false"
invalid-color="yellow" mark="true">
<input name="proj_name" type="text" class="form" id="proj_name"
value="" size="50" maxlength="50" required="true" readonly="true">
Cheers
Chris
are you using the validation script from the Files section? if you
are, you only need to set the datetime attribute of the field you want
to validate:
<input name="date" id="date" type="text" datetime="MM/DD/YYYY hh:nn:ss" />
or
document.getElementById("date").datetime = "MM/DD/YYYY hh:nn:ss ampm";
if you want to use a 24 hour clock, use hh24 instead of hh. if not,
i'd recommend using the ampm token, though no tokens are required.
--- In validation@yahoogroups.com, "Shree" <l504850@e...> wrote:
>
> Can anyone help me in providing the Date-Time validation function in
> Javascript? The required format is MM/DD/YYYY hh:mm:ss
>
> Thanks
> Raj
>
I don't intend to go so far as to create some kind of custom API
project. I was intending more to separate the noise from the actual
implementation of the validation mess--more of a clean-up of a
too-large script than anything else.
I also don't want to inject a dependence on another external framework
or script--I want to make sure you all can do things the way you like
to. That's why I'm trying to leave more hooks as I go through this
round of refactoring, including the idea of overridable default values
and functions. That way you can write, for example, your own
mechanism for marking required or invalid fields.
I'm not too familiar with WebForms 1 or 2. If you feel like kicking
off some sort of group discussion for that, I'd hope others would like
to contribute. In fact, I'd like to see this whole thing progress on
a more open source path than what it is now.
Thanks for the feedback!
--- In validation@yahoogroups.com, "Hallvord R. M. Steen"
<hallvord@o...> wrote:
> On Thu, 15 Sep 2005 22:47:00 +0200, somematt <matthew.a.frank@g...>
> wrote:
>
> > I've been working lately on updating the validation script to handle
> > more XXX and yield more opportunities for customizing behavior and
> > whatnot. As I progress, I'm finding that I'm extracting more and more
> > to what appears more like DOM/JavaScript API extensions. What does
> > everyone think of my splitting the API script from the validation
> > script?
>
> I'm not a neutral user of your script :-) but something I would like
to
> see is JS-emulations of the form validation in WebForms 2, meant to
make
> sure Internet Explorer "understands" WF2 features. How much work
would it
> be to make a WF2 - version of "validation"?
>
> API extensions are interesting but there already are quite a few of
them
> and it is easy to end up like DynAPI - an enormous library that
requires
> considerable study to use in an interesting way < this is obviously
just
> my opinion and don't tell the DynAPI guys what I said :-p >.
>
> WF2 spec is here:
> http://whatwg.org/specs/web-forms/current-work/
> --
> Hallvord R. M. Steen
> Core QA JavaScript tester, Opera Software
> http://www.opera.com/
> Opera - simply the best Internet experience
On Thu, 15 Sep 2005 22:47:00 +0200, somematt <matthew.a.frank@...>
wrote:
> I've been working lately on updating the validation script to handle
> more XXX and yield more opportunities for customizing behavior and
> whatnot. As I progress, I'm finding that I'm extracting more and more
> to what appears more like DOM/JavaScript API extensions. What does
> everyone think of my splitting the API script from the validation
> script?
I'm not a neutral user of your script :-) but something I would like to
see is JS-emulations of the form validation in WebForms 2, meant to make
sure Internet Explorer "understands" WF2 features. How much work would it
be to make a WF2 - version of "validation"?
API extensions are interesting but there already are quite a few of them
and it is easy to end up like DynAPI - an enormous library that requires
considerable study to use in an interesting way < this is obviously just
my opinion and don't tell the DynAPI guys what I said :-p >.
WF2 spec is here:
http://whatwg.org/specs/web-forms/current-work/
--
Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
http://www.opera.com/
Opera - simply the best Internet experience
I've been working lately on updating the validation script to handle
more XXX and yield more opportunities for customizing behavior and
whatnot. As I progress, I'm finding that I'm extracting more and more
to what appears more like DOM/JavaScript API extensions. What does
everyone think of my splitting the API script from the validation
script?
The effect would be the addition of an extra script file to include.
I will probably write some mechanism to attempt an include
automatically for backwards compatibility reasons, but it then extends
the opportunity of using the API stuff to everyone else. Do you all
even care?
i still can't re-create the defect below. can anyone else confirm the
bahvior? anyone have any ideas on what's up?
i'm running jetty for development, so that could be the problem to
start. another possibility is that i just hadn't fixed enough of the
IE issues yet, since i develop mainly in FireFox.
--- In validation@yahoogroups.com, "rschaeferiii"
<Richard.Schaefer@t...> wrote:
> I unpacked the Zip file into a directory on my IIS web server and tried
> to open validation.htm. I received a general script error on "line 99".
> Since there's no line 99 in validation.htm I assume it's talking about
> line 99 in the validation.js file.
>
> Any thoughts?
>
> nb. I don't get the same error when I open the file directly in IE 6.0
> from a folder on my desktop...
I unpacked the Zip file into a directory on my IIS web server and tried
to open validation.htm. I received a general script error on "line 99".
Since there's no line 99 in validation.htm I assume it's talking about
line 99 in the validation.js file.
Any thoughts?
nb. I don't get the same error when I open the file directly in IE 6.0
from a folder on my desktop...
so i've already found an issue in this beta with IE. seems IE's
javascript implementation doesn't support 'delete'. or at least my
use of it.
has anyone checked out the "run-time getter closure" for properties?
i'm interested in getting feedback on this technique. for a given field:
<input type="text required=@..." ... />
you can evaluate script almost like a getter. i was personally tired
of writing extra script in event handlers to keep all the properties
updated. i'm sure there's more i can do with it (like supporting IE)
so i wanna know what you think.
Hello,
This email message is a notification to let you know that
a file has been uploaded to the Files area of the validation
group.
File : /Cross-browser/validation-3.2.0.zip
Uploaded by : somematt <matthew.a.frank@...>
Description : More of a release candidate. I've added support for propery
evaluation as script.. I'm still tinkering with it, so any brave souls who want
to try it out, please do. I think it's fairly stable and performance doesn't
appear to be an issue.
You can access this file at the URL:
http://groups.yahoo.com/group/validation/files/Cross-browser/validation-3.2.0.zi\
p
To learn more about file sharing for your group, please visit:
http://help.yahoo.com/help/us/groups/files
Regards,
somematt <matthew.a.frank@...>
i've used something like this before:
*****************
with (document.forms[0]) {
radioButtonGroup[0].OR= [radioButtonGroup[1]];
dropdown.AND = [radioButtonGroup[1]];
}
*****************
you may have difficulty in getting this to work if you rely on
selectedIndex to determine validity. generally, the value of the
control determines validity by default. you can always write custom
script for the onvalidate event, a hook included to enable more
complex validation.
i don't think the "msg" attribute on the OR object works in the latest
version. i think it requires the use of "OR-MESSAGE" on the element.
element.OR = [anElement, anotherElement];
element["OR-MESSAGE"] = "Please choose An Element or Another
Element.";
--- In validation@yahoogroups.com, "William" <williamdunn95@...>
wrote:
>
>
> I've just inherited this project from a person who is no longer
here.
> The desired result of this validation is to throw a message if (!
> rdoCat[0].checked) or (rdoCat[1].checked and
> cboCatsFrom.selectedIndex == -1).
> Any help would be great...as a back up, I'm going to write my own
> validation, but I know my boss would rather I use this script.
>
> Thanks!
>
> ////////////////////////////////////////////////////
> var f=document.frmAdd;
>
> with (f) {
> if (f.rdoCat[0] != null){
> rdoCat[0].OR={"fields":new Array(rdoCat[1]),"msg":"blah..."};
> }
> }
> ////////////////////////////////////////////////////
I've just inherited this project from a person who is no longer here.
The desired result of this validation is to throw a message if (!
rdoCat[0].checked) or (rdoCat[1].checked and
cboCatsFrom.selectedIndex == -1).
Any help would be great...as a back up, I'm going to write my own
validation, but I know my boss would rather I use this script.
Thanks!
////////////////////////////////////////////////////
var f=document.frmAdd;
with (f) {
if (f.rdoCat[0] != null){
rdoCat[0].OR={"fields":new Array(rdoCat[1]),"msg":"blah..."};
}
}
////////////////////////////////////////////////////
Something like?
case "select-multiple" :
for(var i=0,iOptions=element.options.length; i<iOptions; i++)
if(element.options[i].selected &&
trim(element.options[i].value.toString())){
if (trim(element.options[i].value.toString()))= '0' {
returnValue=False;
break;
}
else {
returnValue=true;
break;
}
break;
Richard W. Schaefer | HTSC Application Development & Maintenance |
860.547.5176
-----Original Message-----
From: somematt [mailto:matthew.a.frank@...]
Sent: Thursday, February 10, 2005 9:45 AM
To: validation@yahoogroups.com
Subject: [validation] Re: Multiple Select List
at that point, i'd just update the script. i think that's the path of
least resistance.
--- In validation@yahoogroups.com, "Schaefer, Richard W (HTSC, CASD)"
<Richard.Schaefer@t...> wrote:
> I was afraid that custom validation was going to be the answer...
This page
> has about 300 lines of Javascript field validation code. I was
hoping to use
> Validate to eliminate that code.
>
>
>
> Of course if all the multiple select fields have the same Default
value then
> I could probably code a general purpose custom validation for the
> multiple-select boxes... Hmm... I'll have to think about this one...
>
>
>
> Richard W. Schaefer | HTSC Application Development & Maintenance |
> 860.547.5176
>
>
>
>
>
> -----Original Message-----
> From: somematt [mailto:matthew.a.frank@g...]
> Sent: Thursday, February 10, 2005 9:17 AM
> To: validation@yahoogroups.com
> Subject: [validation] Re: Multiple Select List
>
>
>
>
> the code for determining the value of a select-multiple:
>
> **************************************
> case "select-multiple" :
> for(var i=0,iOptions=element.options.length; i<iOptions; i++)
> if(element.options[i].selected &&
> trim(element.options[i].value.toString())){
> returnValue=true;
> break;
> }
> break;
> **************************************
>
> if there is at least one option selected that has a non-empty value,
> the control will pass required validation. if you want to include 0
> as an empty value, you can alter the logic in your copy of the script
> or you can create a custom onvalidate handler that accomplishes the
> same thing.
>
>
>
> --- In validation@yahoogroups.com, "rschaeferiii"
> <Richard.Schaefer@t...> wrote:
> >
> > I have an input field in a form that is <SELECT MULTIPLE
> > NAME="mslist" REQUIRED="on">. If I fill in the form and Submit it I
> > don't get any validation error that nothing was selected. Could this
> > be because the default ("empty") first entry is "selected"? If so is
> > there a way to check that at least one entry is selected AND the
> > value is <> "" (or <>0 depending on the list...).
> >
> > I'm running v3.1.4.
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>
> ADVERTISEMENT
>
>
<http://us.ard.yahoo.com/SIG=129nqj85u/M=298184.6018725.7038619.3001176/D=gr
<http://us.ard.yahoo.com/SIG=129nqj85u/M=298184.6018725.7038619.3001176/D=gr
>
>
oups/S=1705007709:HM/EXP=1108131466/A=2532114/R=2/SIG=12klsila3/*http:/clk.a
> tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108045066516868>
>
>
>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110804
> &time=110804
> 5066516868>
>
>
>
>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
>
> :HM/A=2532114/rand=375989448>
>
>
>
> _____
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/validation/
<http://groups.yahoo.com/group/validation/>
> <http://groups.yahoo.com/group/validation/
<http://groups.yahoo.com/group/validation/> >
>
>
> * To unsubscribe from this group, send an email to:
> validation-unsubscribe@yahoogroups.com
> <mailto:validation-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> <http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/> >
Service.
>
>
>
> This communication, including attachments, is for the exclusive use of
> addressee and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, any use, copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you are not the intended recipient, please notify the sender
> immediately by return email and delete this communication and
destroy all copies.
>
>
>
> [Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=1299p3io6/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705007709:HM/EXP=1108133180/A=2532114/R=2/SIG=12khdl06q/*http:/clk.a
tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108046780005857>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110804
6780005857>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2532114/rand=918781950>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/validation/
<http://groups.yahoo.com/group/validation/>
* To unsubscribe from this group, send an email to:
validation-unsubscribe@yahoogroups.com
<mailto:validation-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/> Service.
[Non-text portions of this message have been removed]
at that point, i'd just update the script. i think that's the path of
least resistance.
--- In validation@yahoogroups.com, "Schaefer, Richard W (HTSC, CASD)"
<Richard.Schaefer@t...> wrote:
> I was afraid that custom validation was going to be the answer...
This page
> has about 300 lines of Javascript field validation code. I was
hoping to use
> Validate to eliminate that code.
>
>
>
> Of course if all the multiple select fields have the same Default
value then
> I could probably code a general purpose custom validation for the
> multiple-select boxes... Hmm... I'll have to think about this one...
>
>
>
> Richard W. Schaefer | HTSC Application Development & Maintenance |
> 860.547.5176
>
>
>
>
>
> -----Original Message-----
> From: somematt [mailto:matthew.a.frank@g...]
> Sent: Thursday, February 10, 2005 9:17 AM
> To: validation@yahoogroups.com
> Subject: [validation] Re: Multiple Select List
>
>
>
>
> the code for determining the value of a select-multiple:
>
> **************************************
> case "select-multiple" :
> for(var i=0,iOptions=element.options.length; i<iOptions; i++)
> if(element.options[i].selected &&
> trim(element.options[i].value.toString())){
> returnValue=true;
> break;
> }
> break;
> **************************************
>
> if there is at least one option selected that has a non-empty value,
> the control will pass required validation. if you want to include 0
> as an empty value, you can alter the logic in your copy of the script
> or you can create a custom onvalidate handler that accomplishes the
> same thing.
>
>
>
> --- In validation@yahoogroups.com, "rschaeferiii"
> <Richard.Schaefer@t...> wrote:
> >
> > I have an input field in a form that is <SELECT MULTIPLE
> > NAME="mslist" REQUIRED="on">. If I fill in the form and Submit it I
> > don't get any validation error that nothing was selected. Could this
> > be because the default ("empty") first entry is "selected"? If so is
> > there a way to check that at least one entry is selected AND the
> > value is <> "" (or <>0 depending on the list...).
> >
> > I'm running v3.1.4.
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>
> ADVERTISEMENT
>
>
<http://us.ard.yahoo.com/SIG=129nqj85u/M=298184.6018725.7038619.3001176/D=gr
>
oups/S=1705007709:HM/EXP=1108131466/A=2532114/R=2/SIG=12klsila3/*http:/clk.a
> tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108045066516868>
>
>
>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110804
> 5066516868>
>
>
>
>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
> :HM/A=2532114/rand=375989448>
>
>
>
> _____
>
> Yahoo! Groups Links
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/validation/
> <http://groups.yahoo.com/group/validation/>
>
>
> * To unsubscribe from this group, send an email to:
> validation-unsubscribe@yahoogroups.com
> <mailto:validation-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> <http://docs.yahoo.com/info/terms/> Service.
>
>
>
> This communication, including attachments, is for the exclusive use of
> addressee and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, any use, copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you are not the intended recipient, please notify the sender
> immediately by return email and delete this communication and
destroy all copies.
>
>
>
> [Non-text portions of this message have been removed]
I was afraid that custom validation was going to be the answer... This page
has about 300 lines of Javascript field validation code. I was hoping to use
Validate to eliminate that code.
Of course if all the multiple select fields have the same Default value then
I could probably code a general purpose custom validation for the
multiple-select boxes... Hmm... I'll have to think about this one...
Richard W. Schaefer | HTSC Application Development & Maintenance |
860.547.5176
-----Original Message-----
From: somematt [mailto:matthew.a.frank@...]
Sent: Thursday, February 10, 2005 9:17 AM
To: validation@yahoogroups.com
Subject: [validation] Re: Multiple Select List
the code for determining the value of a select-multiple:
**************************************
case "select-multiple" :
for(var i=0,iOptions=element.options.length; i<iOptions; i++)
if(element.options[i].selected &&
trim(element.options[i].value.toString())){
returnValue=true;
break;
}
break;
**************************************
if there is at least one option selected that has a non-empty value,
the control will pass required validation. if you want to include 0
as an empty value, you can alter the logic in your copy of the script
or you can create a custom onvalidate handler that accomplishes the
same thing.
--- In validation@yahoogroups.com, "rschaeferiii"
<Richard.Schaefer@t...> wrote:
>
> I have an input field in a form that is <SELECT MULTIPLE
> NAME="mslist" REQUIRED="on">. If I fill in the form and Submit it I
> don't get any validation error that nothing was selected. Could this
> be because the default ("empty") first entry is "selected"? If so is
> there a way to check that at least one entry is selected AND the
> value is <> "" (or <>0 depending on the list...).
>
> I'm running v3.1.4.
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=129nqj85u/M=298184.6018725.7038619.3001176/D=gr
oups/S=1705007709:HM/EXP=1108131466/A=2532114/R=2/SIG=12klsila3/*http:/clk.a
tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=1108045066516868>
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time=110804
5066516868>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
:HM/A=2532114/rand=375989448>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/validation/
<http://groups.yahoo.com/group/validation/>
* To unsubscribe from this group, send an email to:
validation-unsubscribe@yahoogroups.com
<mailto:validation-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
<http://docs.yahoo.com/info/terms/> Service.
This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and destroy all
copies.
[Non-text portions of this message have been removed]
the code for determining the value of a select-multiple:
**************************************
case "select-multiple" :
for(var i=0,iOptions=element.options.length; i<iOptions; i++)
if(element.options[i].selected &&
trim(element.options[i].value.toString())){
returnValue=true;
break;
}
break;
**************************************
if there is at least one option selected that has a non-empty value,
the control will pass required validation. if you want to include 0
as an empty value, you can alter the logic in your copy of the script
or you can create a custom onvalidate handler that accomplishes the
same thing.
--- In validation@yahoogroups.com, "rschaeferiii"
<Richard.Schaefer@t...> wrote:
>
> I have an input field in a form that is <SELECT MULTIPLE
> NAME="mslist" REQUIRED="on">. If I fill in the form and Submit it I
> don't get any validation error that nothing was selected. Could this
> be because the default ("empty") first entry is "selected"? If so is
> there a way to check that at least one entry is selected AND the
> value is <> "" (or <>0 depending on the list...).
>
> I'm running v3.1.4.
I have an input field in a form that is <SELECT MULTIPLE
NAME="mslist" REQUIRED="on">. If I fill in the form and Submit it I
don't get any validation error that nothing was selected. Could this
be because the default ("empty") first entry is "selected"? If so is
there a way to check that at least one entry is selected AND the
value is <> "" (or <>0 depending on the list...).
I'm running v3.1.4.
I've put that line in and the problem seems to have
cleared up fine.
Thanks for your help.
--- somematt <matthew.a.frank@...> wrote:
---------------------------------
if i line 453:
>>>
if(element.value && element.type != "file")
element.value =
trim(element.value);
<<<
i haven't done much testing on the script with this
change, so i don't
know if anything else will fail. can you try it out
and let me know?
if it sails for you, i'll drop another update.
--- In validation@yahoogroups.com, Chadaway Steve
<s_chadaway@...> wrote:
> Version 3.1.3 is the latest entry in the readme file
>
>
> --- somematt <matthew.a.frank@g...> wrote:
>
> ---------------------------------
>
> what version are you using? i'll check what's on
line
> 453.
>
> --- In validation@yahoogroups.com, "s_chadaway"
> <s_chadaway@> wrote:
> >
> > Hi,
> >
> > I have a form with several fields on it which are
> being validated
> > using the script, works fine. However, I also
have
> a file input field
> > on the form for uploading an image, if I fill this
> field when
> > submitting the form I get the following error:
> >
> > Error: uncaught exception: [Exception... "Security
> error" code:
> > "1000" nsresult: "0x805303e8
> (NS_ERROR_DOM_SECURITY_ERR)" location:
> >
>
"http://localhost/WebSites/test/www/includes/validation.js
> Line: 453"]
> >
> > This only happens if I fill the file field in.
Any
> help much
> > appreciated on this problem?
> >
> > Thanks
> >
> > Steve
>
>
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/validation/
>
> To unsubscribe from this group, send an email to:
> validation-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the
Yahoo!
> Terms of Service.
>
>
>
>
>
>
>
___________________________________________________________
> ALL-NEW Yahoo! Messenger - all new features - even
more fun!
http://uk.messenger.yahoo.com
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/validation/
To unsubscribe from this group, send an email to:
validation-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com
if i line 453:
>>>
if(element.value && element.type != "file") element.value =
trim(element.value);
<<<
i haven't done much testing on the script with this change, so i don't
know if anything else will fail. can you try it out and let me know?
if it sails for you, i'll drop another update.
--- In validation@yahoogroups.com, Chadaway Steve <s_chadaway@...> wrote:
> Version 3.1.3 is the latest entry in the readme file
>
>
> --- somematt <matthew.a.frank@g...> wrote:
>
> ---------------------------------
>
> what version are you using? i'll check what's on line
> 453.
>
> --- In validation@yahoogroups.com, "s_chadaway"
> <s_chadaway@> wrote:
> >
> > Hi,
> >
> > I have a form with several fields on it which are
> being validated
> > using the script, works fine. However, I also have
> a file input field
> > on the form for uploading an image, if I fill this
> field when
> > submitting the form I get the following error:
> >
> > Error: uncaught exception: [Exception... "Security
> error" code:
> > "1000" nsresult: "0x805303e8
> (NS_ERROR_DOM_SECURITY_ERR)" location:
> >
> "http://localhost/WebSites/test/www/includes/validation.js
> Line: 453"]
> >
> > This only happens if I fill the file field in. Any
> help much
> > appreciated on this problem?
> >
> > Thanks
> >
> > Steve
>
>
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/validation/
>
> To unsubscribe from this group, send an email to:
> validation-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service.
>
>
>
>
>
>
> ___________________________________________________________
> ALL-NEW Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com