Spry w3c validation
Hi All,
Have just implemented some spry elements into my site but
it's failing validation due to the spry.
there is no attribute "spry:region" and there is no attribute
"spry:repeat"
Anybody know of any work arounds for this?
Cheers,
Simon
http://labs.adobe.com/technologies/spry/articles/best_practices/validating_spry.html
Ken Ford
Adobe Community Expert - Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com
"simonEntertainmentStore"
<[email protected]> wrote in message
news:g5gufr$6ps$[email protected]..
> Hi All,
>
> Have just implemented some spry elements into my site
but it's failing
> validation due to the spry.
>
> there is no attribute "spry:region" and there is no
attribute "spry:repeat"
>
> Anybody know of any work arounds for this?
>
> Cheers,
>
> Simon
>
Similar Messages
-
UI Datepicker and Spry textfield Validation
Hi, I am having a problem with using the UI Date picker and Spry textfield Validation together. I have created a sample form: 2 input boxe, the test box has the datepicker and spry validation and test2 has the date picker only,one submit button and some php code that echos the boxes values on submit.
My date picker is date formated as 'yy-mm-dd' for four digit year. My spry validation is formated 'yyyy-mm-dd' with validate on submit.
Now when I click on the test input box the datepicker comes up normally and i select a date. I then select the date on test2. Once I click the submit button the test field with spry validation come back saying a value is required and nothing else happens.
I was playing around and trying other things to get it to work and I noticed that when I select the test inputbox and the calander pops up if I enter some numbers into the text box then select a date from the datepicker then enter a date in the test2 inputbox and hit submit it works.
So it appears to me that the validation is not reading anything in the test field when I just select a date. Why is that? When I select a date it shows a date in the inputbox. It makes it hard to use the datepicker on a form.
Any help would be a preciated. Code is below.
Thanks Winrol
<?php echo "Test box 1 value = ". $_POST['test']. "<br/>" ?>
<?php echo "Test box 2 value = ". $_POST['test2'] ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet" type="text/css" />
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* BeginOAWidget_Instance_2137022: #datepicker */
#datepicker .ui-widget {
font-family: inherit;
#datepicker .ui-datepicker {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
#datepicker .ui-datepicker-title {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 1.1em;
color: #000;
font-weight: normal;
line-height: 1.8em;
#datepicker .ui-state-default, .ui-widget-content .ui-state-default {
border-color: #e6e6e6;
background-color: #e6e6e6;
color: #555555;
#datepicker .ui-state-default, .ui-state-default a {
color: #555555;
#datepicker .ui-state-highlight, .ui-widget-content .ui-state-highlight {
border-color:#FCEFA1;
background-color:#FCEFA1;
color:#363636;
#datepicker .ui-state-active, .ui-widget-content .ui-state-active {
border-color: #FFFFFF;
background-color: #FFFFFF;
color: #212121;
#datepicker .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus
border-color: #5F5F5F;
background-color: #5F5F5F;
color: #212121;
#datepicker .ui-widget-header
border-color: #5F5F5F;
background-color: #808080;
border-width: 1px;
/* Text attributes for the Days of Week Text */
#datepicker .ui-datepicker table th
font-size: .8em;
color: #000;
font-weight: bold;
/* EndOAWidget_Instance_2137022 */
</style>
<script type="text/xml">
<!--
<oa:widgets>
<oa:widget wid="2137022" binding="#datepicker" />
</oa:widgets>
-->
</script>
<script type="text/javascript">
// BeginOAWidget_Instance_2137022: #datepicker
$(function() {
$('input').filter('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});
// EndOAWidget_Instance_2137022
</script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
background-color: #FFC;
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p>
<label for="test">test</label>
<span id="sprytextfield1">
<input name="test" type="text" class="datepicker" id="test"/>
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p>
<p>
<label for="test2">test2</label>
<input name="test2" type="text" id="test2" class="datepicker" />
</p>
<p onclick="<?php echo $_POST['test'] ?>">
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
</form>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"yyyy-mm-dd", hint:"yyyy-mm-dd"});
</script>
</body>
</html>This does work
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.core.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.theme.css" rel="stylesheet">
<link href="jquery-ui-1.7.2/css/base/ui.datepicker.images.css" rel="stylesheet">
</head>
<body>
<form action="" method="post">
<span id="sprytextfield1">
<label for="mydate">Date:</label>
<input id="datepicker" name="mydate" type="text">
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<div id="datepicker" class="ui-glass-gradient ui-80TopTo0Bottom-gradient-header"></div>
<input name="mysubmit" type="submit">
</form>
<script src="SpryAssets/SpryValidationTextField.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-1.3.2.min.js"></script>
<script src="jquery-ui-1.7.2/js/jquery-ui-1.7.2.min.js"></script>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy", validateOn:["change"], useCharacterMasking:true});
$(function() {
$('#datepicker').datepicker({ showOtherMonths: false });
</script>
</body>
</html>
Gramps -
Menu problem with w3c validator
DW CS5.5
When I test a php page with a select menu in the w3c validator, I get the following error message on each element within it:
The select element cannot have more than one selected option descendant unless the multiple attribute is specified. [HTML5]
Whether selected as a menu or a list, it still appears. I was under the impression that you only select one item from a list unless you check "allow multiple" and I only need one item to be selected.
The list or menu displays and works properly, selecting one item as required.
Is this a validator error or is there something wrong with my DW generated code? - shown as a list in this case:Most containers have their own XML parsing JAR's. You do not want to normally remove these (as they parse XML deployment and configuration files). However, you can add your own XML parsing JAR files to WEB-INF/lib.
- Saish -
W3c validator: looking for suggestions
Hi all,
can anybody help me with this?
I tried to validate the following page:
www.giuseppeguzzardi.com
I did this because the page was not correctly visible in
Netscape. I solved the incompatibility problems and now it is
visible.
The point is that now the validator shows the following
errors:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.giuseppeguzzardi.com%2F&charset=%28dete ct+automatically%29&doctype=Inline&verbose=1
Honestly I doubt that all these errors really need to be
solved, for example the tag alt that is indicated as an error is
related to immages that are only decorative.
The height of the table are necessary for the visualization
of the background immages and the same background images are
necessary also for layout reasons.
The thing that I really don' t know anything about is the
doctype declaration at the very beginning of the page code.
But the only thing I know is that if I write this
declaration, Netscape screws up all the tables.
Has anyone of you encountered similar problems? In how far is
it recomendable to really consider all errors indicated by the w3c
validator?
Thanks a lot for any helpful suggestions,
SuperGuzOn 08 Mar 2007 in macromedia.dreamweaver, SuperGuz wrote:
> Hi all,
>
> can anybody help me with this?
> I tried to validate the following page:
> www.giuseppeguzzardi.com
>
> I did this because the page was not correctly visible in
Netscape. I
> solved the incompatibility problems and now it is
visible.
> The point is that now the validator shows the following
errors:
>
>
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.giuseppeguzzardi.c
> om%2F&chars
et=%28detect+automatically%29&doctype=Inline&verbose=1
>
> Honestly I doubt that all these errors really need to be
solved, for
> example the tag alt that is indicated as an error is
related to
> immages that are only decorative.
Those are small, but they're easily corrected, and the alt
attribute is
an accessibility issue. Alt attributes are used by screen
readers to
help describe the page.
> The height of the table are necessary for the
visualization of the
> background immages and the same background images are
necessary also
> for layout reasons.
>
> The thing that I really don' t know anything about is
the doctype
> declaration at the very beginning of the page code.
http://alistapart.com/stories/doctype/
The big deal is that if you don't have a doctype, it's
unpredictable
how browsers will display a page. With a doctype, browsers go
into
standards mode and it's fairly predictable.
> But the only thing I know is that if I write this
declaration,
> Netscape screws up all the tables.
Truth be told, Netscape is not a big consideration; I rarely
see it in
website stats. The browsers you should consider:
- Internet Explorer 6
- Firefox; I don't see much difference in page rendering
between FF1.5
and FF2
- IE7
- Safari
Also, the rule of thumb to make your life easier is to design
to
FireFox, then correct any problems you see in IE.
> Has anyone of you encountered similar problems? In how
far is it
> recomendable to really consider all errors indicated by
the w3c
> validator?
If you understand the error and its implications, then by all
means,
ignore them. I personally find that correcting validation
errors makes
code easier to understand, debug and maintain.
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php -
Problems producing W3C-valid template-built pages
Folks:
DW CS3 on Intel Mac
CMX Design-Time Extension
I would like my site to pass the W3C markup validator,
http://validator.w3.org/.
My site design is straightforward: I've got a single
custom-built template page, "index.php" for the layout of my site.
There's no content in this file. The header of this file contains a
link to my site's single master CSS style-sheet.
All content comes from one of over 100 html "contact-chunk"
files, each of which contains only "bare" HTML, no header or
trailer material at all, no <!DOCTYPE...> nor <html>
... <head> ... </head> ... <body> ..
</body> stuff at all. One of these contact-chunk files is
included at each page-load. The details are not important.
Wait, I lied: Each of those contact-chunk files contains a
bare link to the site's master CSS style-sheet, like this:
<link href="/TheMasterStyleSheet.css" rel="stylesheet"
type="text/css">
"Bare", meaning NOT enclosed by <head> ...
</head> or anything else. DW requires just the link so it can
detect the site-wide style-sheet and let me apply styles from it to
the "content-chunk" files.
When complete pages are served to clients, that extra link
would ordinarily mean the browser would see two different external
style-sheet links from the composite page at load-time, which is is
not allowed. This is in fact flagged as an error by W3C validator.
There is no sense in giving browsers known-invalid code! It
makes total sense to me that links to external styles-sheets need
to occur just once,in the header of such composites as they are
seen by browsers. It also makes sense to me that the contact chunk
files could not contain <html> ... <head> ...
</head> ... <body> .. </body> tags because these
would be nested within the <body>... </body? structure in
the template page. Confusion!
Thanks to the DW designers, there's a way to avoid sending
the second style-sheet link: DW's Design-Time Style-Sheet mechanism
allows me declare specific style-sheet links as Design-Time ONLY;
the specified links are stripped before the files are uploaded. DW
CS3 supports only page-by-page declarations, But with the
minimal-cost "CMX Design-time" extension (
http://www.communitymx.com/abstract.cfm?CID=61265)
added, I can make these declarations on a site-wide basis. Cool!
All the above seems quite reasonable and how-it-must-be for
template-include designs. However,I have found two problems:
1. The Design-Time Style Sheet Mechanism works unpredictably
When I tell the CMX Design-time Extension to exclude my
master CSS style-sheet link from all .html files, site-wide, it
apparently does what it is required to make this happen: it creates
.mno files in _notes folders corresponding to all .html files in
the source tree. (The only files with .html extensions in my source
tree are such content-chunk files.) Without the extension, I'd end
up with identical files after manually applying Text--> CSS
Styles -->Design-Time individually to all the content-chunk
files.
I did have some successful test runs on individual content
chunk files, so I know the Design-Time Mechanism is fundamentally
sound.
Yes, I am certain I re-PUT all the .html files to the server
to allow the specified CSS link in each to be stripped. There is
only one external style-sheet, and I'm certain I specified that
one. Yes, I looked in the DW and extension documentation for
additional information.
2. This Design-Time Style Sheet mechanism is completely
ineffective for embedded styles in content-chunk files..
I think embedded styles are completely legal, and make
perfect sense when particular styles are needed only for one source
file. A few of my contact-chunk files contain these.
My questions:
Question 1: How to assure that the DW Design-Time mechanism
is activated and works consistently? Or how to debug it? What
exactly should appear in the _notes/*.mno files?
Question 2: Assuming both my development machine and the
server are running Unix, is there any downside to picking a
distinctive extension for content-chunk files? Any standard? How
about ".ihtml" e.g., "foo.ihtml"?
Question 3: Is there any alternative that preserves embedded
styles in my design? (I think it is inevitable that I'll need to
move my local styles to the master CSS style-sheet or use in-line
styles. I'm just checking in case I've missed a clever
alternative.)
Question 4: I'm doing a lot of work to make this design work
with site-wide CSS, and each time I solve one issue, another one
pops up. In my experience, that pattern either means I'm trying to
use a subtle, complex mechanism, which simply takes a while to get
right. Or that I've committed a fundamental design error, and
there's possibly a much easier way to accomplish the same result.
Which?
TIA,
Henry
TIA,
Henry> "Bare", meaning NOT enclosed by <head> ...
</head> or anything else.
> DW
> requires just the link so it can detect the site-wide
style-sheet and let
> me
> apply styles from it to the "content-chunk" files.
Won't work. The chunks are going in the body. Links to
stylesheets in the
body are invalid HTML and ignored by the browsers.
> When complete pages are served to clients, that extra
link would
> ordinarily
> mean the browser would see two different external
style-sheet links from
> the
> composite page at load-time, which is is not allowed.
This is in fact
> flagged
> as an error by W3C validator.
This makes no sense. A page can have oodles of links to
external
stylesheets, but they must all be in the head of the page.
> 1. The Design-Time Style Sheet Mechanism works
unpredictably
Perhaps it's more accurate to say that the CMX extension
works unpredictably
with DT Stylesheets. I've never seen an instance of DT
stylesheets failing,
either in my hands or in anyone else's. Your report is the
first. I think
CMX will have to help you with this one.
> 2. This Design-Time Style Sheet mechanism is completely
ineffective for
> embedded styles in content-chunk files..
>
> I think embedded styles are completely legal, and make
perfect sense when
> particular styles are needed only for one source file. A
few of my
> contact-chunk files contain these.
Nope - embedded styles are illegal in this sense.
> Question 2: Assuming both my development machine and the
server are
> running
> Unix, is there any downside to picking a distinctive
extension for
> content-chunk files? Any standard? How about ".ihtml"
e.g.,
> "foo.ihtml"?
Nope. You could use 'monkeybutt' if you wanted. However, if
you want DW
to recognize that extension as containing HTML code you would
need to
'register' it with DW -
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16410&sliceId=1
> Question 3: Is there any alternative that preserves
embedded styles in my
> design? (I think it is inevitable that I'll need to move
my local styles
> to
> the master CSS style-sheet or use in-line styles. I'm
just checking in
> case
> I've missed a clever alternative.)
Yes, you can give each "chunk" chunk-specific container
names, and place the
desired chunk-specific CSS selectors in the parent CSS.
> Question 4: I'm doing a lot of work to make this design
work with
> site-wide
> CSS, and each time I solve one issue, another one pops
up. In my
> experience,
> that pattern either means I'm trying to use a subtle,
complex mechanism,
> which
> simply takes a while to get right. Or that I've
committed a fundamental
> design
> error, and there's possibly a much easier way to
accomplish the same
> result.
> Which?
The latter, I believe.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"hen3ry" <[email protected]> wrote in
message
news:[email protected]...
> Folks:
>
> DW CS3 on Intel Mac
> CMX Design-Time Extension
>
> I would like my site to pass the W3C markup validator,
>
http://validator.w3.org/.
>
> My site design is straightforward: I've got a single
custom-built
> template
> page, "index.php" for the layout of my site. There's no
content in this
> file.
> The header of this file contains a link to my site's
single master CSS
> style-sheet.
>
> All content comes from one of over 100 html
"contact-chunk" files, each of
> which contains only "bare" HTML, no header or trailer
material at all, no
> <!DOCTYPE...> nor <html> ... <head>
... </head> ... <body> .. </body>
> stuff
> at all. One of these contact-chunk files is included at
each page-load.
> The
> details are not important.
>
> Wait, I lied: Each of those contact-chunk files contains
a bare link to
> the
> site's master CSS style-sheet, like this:
>
> <link href="/TheMasterStyleSheet.css"
rel="stylesheet"
> type="text/css">
>
> "Bare", meaning NOT enclosed by <head> ...
</head> or anything else.
> DW
> requires just the link so it can detect the site-wide
style-sheet and let
> me
> apply styles from it to the "content-chunk" files.
>
> When complete pages are served to clients, that extra
link would
> ordinarily
> mean the browser would see two different external
style-sheet links from
> the
> composite page at load-time, which is is not allowed.
This is in fact
> flagged
> as an error by W3C validator.
>
> There is no sense in giving browsers known-invalid code!
It makes total
> sense to me that links to external styles-sheets need to
occur just
> once,in the
> header of such composites as they are seen by browsers.
It also makes
> sense
> to me that the contact chunk files could not contain
<html> ... <head> ...
> </head> ... <body> .. </body> tags
because these would be nested within
> the
> <body>... </body? structure in the template
page. Confusion!
>
> Thanks to the DW designers, there's a way to avoid
sending the second
> style-sheet link: DW's Design-Time Style-Sheet mechanism
allows me
> declare
> specific style-sheet links as Design-Time ONLY; the
specified links are
> stripped before the files are uploaded. DW CS3 supports
only page-by-page
> declarations, But with the minimal-cost "CMX
Design-time" extension
> (
http://www.communitymx.com/abstract.cfm?CID=61265)
added, I can make
> these
> declarations on a site-wide basis. Cool!
>
> All the above seems quite reasonable and how-it-must-be
for
> template-include
> designs. However,I have found two problems:
>
> 1. The Design-Time Style Sheet Mechanism works
unpredictably
>
> When I tell the CMX Design-time Extension to exclude my
master CSS
> style-sheet link from all .html files, site-wide, it
apparently does what
> it is
> required to make this happen: it creates .mno files in
_notes folders
> corresponding to all .html files in the source tree.
(The only files with
> .html extensions in my source tree are such
content-chunk files.) Without
> the
> extension, I'd end up with identical files after
manually applying Text-->
> CSS
> Styles -->Design-Time individually to all the
content-chunk files.
>
> I did have some successful test runs on individual
content chunk files, so
> I
> know the Design-Time Mechanism is fundamentally sound.
>
> Yes, I am certain I re-PUT all the .html files to the
server to allow the
> specified CSS link in each to be stripped. There is only
one external
> style-sheet, and I'm certain I specified that one. Yes,
I looked in the DW
> and
> extension documentation for additional information.
>
>
> 2. This Design-Time Style Sheet mechanism is completely
ineffective for
> embedded styles in content-chunk files..
>
> I think embedded styles are completely legal, and make
perfect sense when
> particular styles are needed only for one source file. A
few of my
> contact-chunk files contain these.
>
> My questions:
>
> Question 1: How to assure that the DW Design-Time
mechanism is activated
> and
> works consistently? Or how to debug it? What exactly
should appear in
> the
> _notes/*.mno files?
>
> Question 2: Assuming both my development machine and the
server are
> running
> Unix, is there any downside to picking a distinctive
extension for
> content-chunk files? Any standard? How about ".ihtml"
e.g.,
> "foo.ihtml"?
>
> Question 3: Is there any alternative that preserves
embedded styles in my
> design? (I think it is inevitable that I'll need to move
my local styles
> to
> the master CSS style-sheet or use in-line styles. I'm
just checking in
> case
> I've missed a clever alternative.)
>
> Question 4: I'm doing a lot of work to make this design
work with
> site-wide
> CSS, and each time I solve one issue, another one pops
up. In my
> experience,
> that pattern either means I'm trying to use a subtle,
complex mechanism,
> which
> simply takes a while to get right. Or that I've
committed a fundamental
> design
> error, and there's possibly a much easier way to
accomplish the same
> result.
> Which?
>
> TIA,
>
> Henry
>
> TIA,
>
> Henry
>
> -
Hi, how can I modify this code for the spry textfield validation.js file? My text field is set to yyyy-mm-dd. When I enter a date and hit the submit button all works well but, how can I modify this portion of the .js file so the date yyyy-mm-dd is not less than today's date?
===================
'date': {
validation: function(value, options) {
var formatRegExp = /^([mdy]+)[\.\-\/\\\s]+([mdy]+)[\.\-\/\\\s]+([mdy]+)$/i;
var valueRegExp = this.dateValidationPattern;
var formatGroups = options.format.match(formatRegExp);
var valueGroups = value.match(valueRegExp);
if (formatGroups !== null && valueGroups !== null) {
var dayIndex = -1;
var monthIndex = -1;
var yearIndex = -1;
for (var i=1; i<formatGroups.length; i++) {
switch (formatGroups[i].toLowerCase()) {
case "dd":
dayIndex = i;
break;
case "mm":
monthIndex = i;
break;
case "yy":
case "yyyy":
yearIndex = i;
break;
if (dayIndex != -1 && monthIndex != -1 && yearIndex != -1) {
var maxDay = -1;
var theDay = parseInt(valueGroups[dayIndex], 10);
var theMonth = parseInt(valueGroups[monthIndex], 10);
var theYear = parseInt(valueGroups[yearIndex], 10);
// Check month value to be between 1..12
if (theMonth < 1 || theMonth > 12) {
return false;
// Calculate the maxDay according to the current month
switch (theMonth) {
case 1: // January
case 3: // March
case 5: // May
case 7: // July
case 8: // August
case 10: // October
case 12: // December
maxDay = 31;
break;
case 4: // April
case 6: // June
case 9: // September
case 11: // November
maxDay = 30;
break;
case 2: // February
if ((parseInt(theYear/4, 10) * 4 == theYear) && (theYear % 100 != 0 || theYear % 400 == 0)) {
maxDay = 29;
} else {
maxDay = 28;
break;
// Check day value to be between 1..maxDay
if (theDay < 1 || theDay > maxDay) {
return false;
// If successfull we'll return the date object
return (new Date(theYear, theMonth - 1, theDay)); //JavaScript requires a month between 0 and 11
} else {
return false;
======================
Thanks WinrolV1 Fusion wrote:
> Yes you can use regular expessions:
>
> function validatePhone(value){
> return
>
/^(((\+44\s?\d{4}|\(?0\d{4}\)?)\s?\d{3}\s?\d{3})|((\+44\s?\d{3}|\(?0\d{3}\)?)\s?
>
\d{3}\s?\d{4})|((\+44\s?\d{2}|\(?0\d{2}\)?)\s?\d{4}\s?\d{4}))(\s?\#(\d{4}|\d{3})
> )?$/.test(value)
> }
>
> var custom = new Spry.ValidationTextField(id, "custom",
{validation:
> validatePhone, validateOn:["blur", "change"]})
>
> regexp from
http://regexlib.com/
Excellent, thank you, that will get me in the right
direction. Its not
100%, but I think I can tinker with an expression to get what
I want.
The number is couldn't handle is +44 (0)113 255 7666 but its
not an
approved format anyway, but lots of companies still do it
this way, so I
want to ensure I get it right.
Thanks again!
Dooza
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html -
Conditional Spry Confirm Validation
Hi Chaps,
I know there are a few of these threads about, however, the answers usually point to a 404 webpage.
I'm after a conditional Spry Confirm Validation Text Field.
E.G. if a user decides to change a password, the (required) confirm validation comes into effect.
If anyone can point me in the right direction, it would help me out.
Many thanks
Samuelnever mind, found this: http://forums.adobe.com/message/2983481#2983481#2983481
-
h:form with W3C validation failure
Hi gurus,
I tried to validate my JSF page against W3C validation rules. However, each <h:form> in my page creates a hidden field as:
"+<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id14:j_id15" />+"
with same id and value, so as a result, i can't pass the validation.
So could anyone has a suggestion on this problem?
BTW, i found some threads suggest to use a "giant" h:form for the entire page, and clearly this is not the answer i am looking for.
Thanks in advance!Yep, it's a known issue.
I've attempted fixes in the RI in the past, however due to potential reliance on the presence of both
fields for AJAX libraries+JSF, it's left as is. -
Javascript banners & W3C validation
I had the understanding that the new way that DW inserts
flash using javascript would eliminate the validation problems in
W3C validator. But that is not the case with my flash banners.
Was I missinformed?
And is there an easy fix to stop W3C complaining about
"EMBED" etc.?Are you using DW 8.0.2? It gets around the problem of the
need to click on
the Active region to 'activate it'. But the code does not
validate,
although it works just fine.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Magooi" <[email protected]> wrote in
message
news:en700l$p33$[email protected]..
>I had the understanding that the new way that DW inserts
flash using
>javascript
> would eliminate the validation problems in W3C
validator. But that is not
> the
> case with my flash banners.
>
> Was I missinformed?
>
> And is there an easy fix to stop W3C complaining about
"EMBED" etc.?
> -
w3c valid site, initially no error reported by developer toolbar. But upon right click (giving the validation menue), the the toolbar reports two errors: width and height. Despite the fact that every page is validated! On the forum for the toolbar, this is said to be a Browser error. So, how can this be fixed? I'm using FF 3.6.6
== This happened ==
Every time Firefox opened
== after update from 3.5?Hi Sara,
Can you give us the URL of the page you're having problems with and of the forum thread you mentioned?
Thanks! -
I have a javascript based scroller that allows for pauses
when you mouse over the text links, and this is just creating
several errors according to the w3c validator.
take a look at a typical link for the news scroller:
<a href="
http://www.gcn.com/online/vol1_no1/45929-1.html?topic=defense-technology&CMP=OTC-RSS"
target="_blank" "javascript:;" onMouseOver="flvXAS1(0)"
onMouseOut="flvXAS1(1,1,50,1)">DISA picks builder for new
HQ</a>
For one, w3c gives me al kinds of warning for just the url
itself... which i think it ridiculous.... because it has "&"
and "=" etc. in the URL, which i have no control over.
Second, it hates the javascript written into the a link.
any suggestions to keep w3c happy?.oO(jsteinmann)
>I have a javascript based scroller that allows for pauses
when you mouse over
>the text links, and this is just creating several errors
according to the w3c
>validator.
>
> take a look at a typical link for the news scroller:
>
> <a
>href="
http://www.gcn.com/online/vol1_no1/45929-1.html?topic=defense-technology&C
>MP=OTC-RSS" target="_blank" "javascript:;"
onMouseOver="flvXAS1(0)"
>onMouseOut="flvXAS1(1,1,50,1)">DISA picks builder for
new HQ</a>
>
> For one, w3c gives me al kinds of warning for just the
url itself... which i
>think it ridiculous.... because it has "&" and "="
etc. in the URL, which i
>have no control over.
It's not ridiculous, but required to encode & as
& in HTML.
Otherwise it will/can be seen as the beginning of a character
reference.
> Second, it hates the javascript written into the a link.
It hates the "javascript:;", which is pretty pointless there.
Micha -
Confused with W3C validation results
Ok so i've had problems with this page (please see below), adapting it to respond to any size device. I was advised to start off by tidying up the errors on the W3C validator. I have reduced the errors right down but am having big problems with the error shown below. I have tried removing all the dl elements from each picture/element and leaving just the one containing the whole section but its still not right.
Can anyone please help me resolve it?
Line 462, Column 4: Element dl is missing a required child element.
<dd> <input name="CAT_Custom_76926" id="CAT_Custom_76926_0" onclick="Recalcula…
www.milesfunerals.com/estimator.phpOk so i've applied my unordered list. (please see below) and i applied the CSS like you suggest. Now how do i get the pictures to sit side by side in rows of two's down the page? Do i need to apply a float left and right to each <li> element or is there an easier way? This is what it currently looks like (www.milesfunerals.com/estimator.php) and this is the layout i need to acheive (www.milesfunerals.com/estimator.html).
<ul>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_0" onclick="Recalculate()" type="radio" value="-190" />
</li>
<li> Basic Simple Coffin (- £190)</li>
<li><span class="dropdownmenu" id="CAT_Custom_00010" name="CAT_Custom_00010" onchange="Recalculate()"><select name="CAT_Custom_00010" class="dropdownmenu" id="CAT_Custom_00010" onchange="Recalculate()">
<option selected="selected" value="0">-- Select additional services --</option>
<option value="225" >Limousine (£225)</option>
<option value="200">Chapel visiting (£200)</option>
<option value="120">Choice of date & time (£120)</option>
<option value="425" >Limousine,Chapel visiting (£425)</option>
<option value="345" >Limousine,Choice of date & time (£345)</option>
<option value="320">Chapel visiting, Choice of date & time (£320)</option>
<option value="545" >Limousine,Chapel visiting, Choice of date & time (£545)</option>
</select></span>
<img src="images/The_Elgar.jpg" alt="Elgar" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Elgar_copy.jpg','','toolbar=yes,width=800,height=400 ')"></li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_4" onclick="Recalculate()" type="radio" value="260" />
<span class="estimatorsmalltext">The Elgar (£260)</span></li>
<li><img src="images/The_Gladstone.jpg" alt="Gladstone" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Gladstone_copy.jpg','','toolbar=yes,width=800,height =400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_5" onclick="Recalculate()" type="radio" value="360" />
<span class="estimatorsmalltext">The Gladstone (£360)</span></li>
<li><img src="images/The_Drake.jpg" alt="Drake" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Drake_copy.jpg','','toolbar=yes,width=800,height=400 ')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_3" onclick="Recalculate()" type="radio" value="435" />
<span class="estimatorsmalltext"> The Drake (£435)</span></li>
<li><img src="images/The_Byron.jpg" alt="Byron" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Byron_copy.jpg','','toolbar=yes,width=800,height=400 ')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_1" onclick="Recalculate()" type="radio" value="500" />
<span class="estimatorsmalltext">The Byron (£500)</span></li>
<li><img src="images/The_Churchill.jpg" alt="Churchill" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Churchill_copy.jpg','','toolbar=yes,width=800,height =400')"></li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_2" onclick="Recalculate()" type="radio" value="560" />
<span class="estimatorsmalltext">The Churchill (£560)</span></li>
<li><img src="images/The_Nelson.jpg" alt="Nelson" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Nelson_copy.jpg','','toolbar=yes,width=800,height=40 0')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_7" onclick="Recalculate()" type="radio" value="630" />
<span class="estimatorsmalltext">The Nelson (£630)</span></li>
<li><img src="images/The_Dickens.jpg" alt="Dickens" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Dickens_copy.jpg','','toolbar=yes,width=800,height=4 00')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_12" onclick="Recalculate()" type="radio" value="1060" />
<span class="estimatorsmalltext">The Dickens (£1060)</span></li>
<li><img src="images/The_Wellington.jpg" alt="Wellington" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Wellington_copy.jpg','','toolbar=yes,width=800,heigh t=400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_11" onclick="Recalculate()" type="radio" value="2160" />
<span class="estimatorsmalltext">The Wellington (£2160)</span></li>
<li><img src="images/The_Victoria.jpg" alt="Victoria" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Victoria_copy.jpg','','toolbar=yes,width=800,height= 400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_10" onclick="Recalculate()" type="radio" value="1060" />
<span class="estimatorsmalltext">The Victoria (£1060)</span></li>
<li><img src="images/colourful.jpg" alt="Colourful" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/colourfulcopy.jpg','','toolbar=yes,width=800,height=400' )"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_13" onclick="Recalculate()" type="radio" value="660" />
<span class="estimatorsmalltext"> The Colourful (£660)</span></li>
<li><img src="images/The_Nightingale.jpg" alt="Nightingale" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Nightingale_copy.jpg','','toolbar=yes,width=800,heig ht=400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_8" onclick="Recalculate()" type="radio" value="630" />
<span class="estimatorsmalltext">The Nightingale (£630)</span></li>
<li><img src="images/The_Pankhurst.jpg" alt="Pankhurst" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Pankhurst_copy.jpg','','toolbar=yes,width=800,height =400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_9" onclick="Recalculate()" type="radio" value="610" />
<span class="estimatorsmalltext">The Pankhurst (£610)</span></li>
<li><img src="images/The_Montgomery.jpg" alt="Montgomery" class="coffinpic" width="150" height="68" onClick="MM_openBrWindow('images/The_Montgomery_copy.jpg','','toolbar=yes,width=800,heigh t=400')"> </li>
<li>
<input name="CAT_Custom_76926" id="CAT_Custom_76926_6" onclick="Recalculate()" type="radio" value="2260" />
<span class="estimatorsmalltext">The Montgomery (£2260)</span></li>
</ul> -
Help sought with W3C Validation issue
In order to place text from a database accurately in a cell I have used:
<span class="cont_layer">
<?php echo $row_restSelect['cel_blb']; // Insert Details from dbase ?>
</span>
However, I am using tinyMCE at the input interface for the MYSQL database and tinyMCE puts in tags like <p> all over the place, so the output looks something like this:
<span class="cont_layer"><p>Some text.<br /> Some more text. <br /> <br /> And a bit more text.</p></span>
This works fine in practice, but I notice that W3C Validation rejects the structure with:
"document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag"
I am using XHTML Transitional.
Is there a way around this, or should I just stop being so anal about validation?A <span> is for inline elements and cannot contain block-level elements, such as paragraphs. Replace your <span> with a <div> and all will be hunky-dory.
<div class="cont_layer">
<?php echo $row_restSelect['cel_blb']; // Insert Details from dbase ?>
</div> -
Sliceing in PS CS2 en coding W3C valid
Hey guys,
I'va just made a layout in PS CS2 and sliced it in ImageReady.
Does somebody know any tutorials or can somebody explane me with examples how i can get the layout W3C valid in (X)HTML??.
Greetz
Pieterok, sorry - this forum is really not that user friendly... but at least the moderators are more polite
-
Is there a way to finesse code validation for things like Spry Menu Bars? I get a consistent "error" with the CSS:
287
ul.MenuBarHorizontal iframe
attempt to find a semi-colon before the property name. add it
0
ul.MenuBarHorizontal iframe
Parse Error null
287
ul.MenuBarHorizontal iframe
Property opacity doesn't exist in CSS level 2.1 but exists in : 0.1 0.1
287
ul.MenuBarHorizontal iframe
Parse Error 0.1);
288
ul.MenuBarHorizontal iframe
Parse Error }
This is the code to which these errors refer:
ul.MenuBarHorizontal iframe
position: absolute;
z-index: 20010;
filter:alpha(opacity:0.1);
I personally find it sufficient to understand that it might not validate, but my client is afraid that his "powers that be" will flip when they see IE display an "Error on page." message. I only see this message on the lower left corner of my IE8 browser when I hover over the Spry Menu Bar.
Are these the same issue, and is there a known way around it or past it?
BethHello Beth,
The piece of CSS you see there is actually a fix for Internet Explorer 6. It has bug where form elements such as selects will go through divs and other elements, in this case the <ul>'s of the menu bar. To resolve this issue, a iframe is generated and carefully placed under the <ul> elements. This way the form elements will no longer pass through the <ul>'s
If you menu is no where near a form element you could remove the iframe generation code form the javascript and savely remove that related stylesheet rule. But i do not recommend such practices. But that would be the only fix for the validation issue. Well.. Thats not true actually you could apply those styles through JavaScript... So that might actually be another option.
So it all depends on how hefty you weight validations. Validations are guid lines. Because a page doesn't "validate" it doesn't necessary mean the page is doomed and will crash all browser that comes on its path . But clients are usally verry narrow minded. So good luck with that .
So without further ado, the fixes:
- do nothing as it doesn't harm your page, it merly fixes internet explorer.
- removal of the iframe from JS:
line 289, remove:
if(Spry.is.ie && Spry.is.version < 7)
this.createIframeLayer(menu);
line 317, remove:
if(Spry.is.ie && Spry.is.version < 7)
this.removeIframeLayer(menu);
- move the css to JavaScript:
line 243 find:
layer.style.left = menu.offsetLeft + 'px';
layer.style.top = menu.offsetTop + 'px';
layer.style.width = menu.offsetWidth + 'px';
layer.style.height = menu.offsetHeight + 'px';
and add under:
layer.style.position = 'absolute';
layer.style.zIndex = 20010;
layer.style.style.filter = "alpha(opacity=0.1)";
Happy hacking
Maybe you are looking for
-
Ipod is recognized by windows but not itunes
i got a 4gb nano and when i connect my ipod to my computer it dosnt show up in itunes i reinstalled everything but it still wont work
-
Noted Items in customer line item report
Hi Friends, What is noted items? what is this use ? i have seen in fbl5n screen ( customer line item report) in type selection. please give u r reply on this i will assign points to you. Thahnks KSR
-
Error in Reporting Authorization
Hi All, I created an authorization object for reporting, which contains 7 different info objects. I tried to apply that info object to a sales report by creating a variable of type authorization. I added the object in a profile and attached it to a r
-
PROBLEM WITH ACTIVATION KEY FOR CRYSTAL REPORT
I have bought 2 licenses of Crystal Report and one of them does'nt work. Could you please tell me what i have to do to get a new one ? Thank's for your help. Regards Eric
-
Hello, I'm getting the following error message: After Effects error: could not convert Unicode characters. (23 :: 46) I have yet to find an answer that works to resolve this problem. I'm using CS6 on an HP Z220 on Windows 7. Thanks in advance.