Dojo NumberTextBox : defining max constraint - dojo

I'm having troubles with the NumberTextBox max constraint. If I use standard markup declaration and create the numbertextbox with default setting, e.g.
dojo.require("dijit.form.NumberTextBox");
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/resources/dojo.css" rel="stylesheet" />
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dijit/themes/claro/claro.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
<body class="claro">
<input id="q05" type="text" dojoType="dijit.form.NumberTextBox" constraints="{places:0}" required="true" >
this control is constrained to be max of 16digits. And that's the issue. What if I need the user to be able to enter a 16+ digit number?
I seem to be unable to overwrite this with the constraints:"{max:99999999999999999999}" (it's 20 of them) nor with the maxLength:"20" attributes.
Any ideas on how to properly set the control to be constrained let's say up to 20 digits, instead of 16 (which appears to be a limit now)?
Thank you

Use ValidationTextBox and use propert regExp to narrow possible input.

Related

Where do I find the "the HTMLQuestion schema URL" and CDATA (newbie ... run out of options)

I want to conduct a simple turk survey.
I've made the form, uploaded the images and set the details but I'm not quite sure what's next.
Here is the framework of my form with what I think are the AWS elements needed but:
1) How do I find the "the HTMLQuestion schema URL"?
2) Do I generate the assignmentId or does it get inserted on the POST?
3) Is there something I need to add for CDATA is it is a placeholder for an array?
(Please forgive my ignorance but I may even being asking the wrong questions. I'm just not clear what to do next - especially to test it myself (sandbox). I tried posting in the Turk forum but no replies in two days. I don't expect the AWS manual to be for novices.)
<pre>
<HTMLQuestion xmlns="[the HTMLQuestion schema URL]">
<HTMLContent><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script>
</head>
<body>
<form name='mturk_form' method='post' id='mturk_form' action='https://www.mturk.com/mturk/externalSubmit'>
<input type='hidden' value='' name='assignmentId' id='assignmentId'/>
... my handwritten form elements ...
</form>
<script language='Javascript'>turkSetAssignmentID();</script>
</body>
</html>
]]>
</HTMLContent>
<FrameHeight>0</FrameHeight>
</HTMLQuestion>
</pre>
Here is the latest link I found so far:
<HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd">

Datatables jquery-ui and position of global search field

With Datatables, I just switched over from the Datatables css to the jquery.datTable.jqueryui.css.
I've been having a hard time trying to figure out how to correct these issues:
The property that will let me correct the label text vertical alignment of the "show ... records per page',
so I can get it to v-align to the bottom
(some other style I have must be hitting it and taking it to v-top
and it looks bad like that).
How can I get the "search" label and field back up on the far right
and on the same line as the "show ... records" field?
How would you apply styles to the text labels of those fields (color, size, etc.)?
I have no styles or attributes effecting things right now, other than whatever base style might be causing the "show...records" text to v-align to the top.
I've tried a few solution and the best result I've gotten so far is that search will move over to the right like it normally would be, except it's still on a new line (so one line down from the "show...records" text & field.
Thanks for any help.
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.structure.min.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.theme.min.css">
<link rel="stylesheet" type="text/css" href="../../css/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery.dataTables_themeroller">
This will give you the "records per page", filter, and pagination on the top of your datatable; spaced using bootstrap grid classes.
sDom: '<"H"r<"col-sm-5"i><"col-sm-3"f><"col-sm-4"p>>t',

What's wrong with my structure data?

It's been more than 4 months that our rich snippets suddenly disappeared, some error were reported in GWT, i corrected everything and errors are now decreasing (only 5 left). here is my code:
<section class="c-center" itemscope itemtype="http://schema.org/Product">
<div>
<h1><span itemprop="name">Product name</span> <span itemprop="brand" class="brand">Brand of product</span></h1>
<div id="reviews" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<div class="rating">
<meta itemprop="ratingValue" content="4.8" />
<meta itemprop="ratingCount" content="56" />
<div class="fill" style="width:96%"></div>
<div class="stars"></div>
</div>
<div class="rating-info">
Based on 56 reviews - Write a review
</div>
</div>
</div>
<div id="img">
<img src="/link-to-image.jpg" alt="Img alt" itemprop="image" />
</div>
<div id="info">
<meta itemprop="url" content="site.com/link-of-product/">
<div id="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="priceCurrency" content="EUR">
<meta itemprop="gtin13" content="1234567899999">
<span class="price" itemprop="price">19,95 €</span> <del>28,50 €</del> -
<span class="stock"><link itemprop="availability" href="http://schema.org/InStock">Available</span>
</div>
</div>
</section>
here are my questions:
1- is there anything wrong?
2- I've seen in many posts that currency should not be in the itemprop="price" but in google examples, they do include it! what should I do?
3- should I use ratingCount or reviewCount ?
4- some products exist in different sizes with different prices, is it recommended to include the AggregateOffer with lowest and highest price?
Thanks a lot
How does it appear visually?
The structured data linter shows a typical snippet which looks good and has star rating, and there are no errors in google's tool. Two things which stand out are:
url has no protocol, set to http://yoursite.com/page1 for
price should be number only, which could well be affecting search results, currency is a separate field so should not be embedded in price as well
use <meta> to give your price with a full stop as the separator, not the comma and put large values as 1234567.89 not 1,234,567.89 or 1.234.567,89 but display it as you would normally
price info from http://schema.org/
Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of including ambiguous symbols such as '$' in the value.
Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.
Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.
Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
google actually gives this example in its policies page
<span itemprop="priceCurrency" content="USD">$</span><span itemprop="price">119.99</</span>
previous Offer price, you could include in <del> structured data for the expired Offer price, with priceValidUntil set to a date in the past, the current price can also have an expiry date.
consider setting itemCondition to http://schema.org/NewCondition
image urls - I've noticed that full url starting path rather than a relative path seem to be preferred - your /link-to-image.jpg is interpreted as http://example.com/link-to-image.jpg not http://site. com/link-to-image.jpg in the testing tool, I'm unsure if this is the same when testing direct from the URL but it seems best not to be amigous
lastly use a shopping search tool, including google shopping to search for a best seller, see if it can find it by price, brand, availability etc. if competitor sites appear first you can even check the structured data tester with their URL to see if you are missing anything

Should SEO microdata for Product include HTML markup in description

My output of product schema look like this.
Shell I remove the html code from "meta itemprop="description" content=" or it must be plain text only?
<span itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="http://www.testest.com/bo-clark-collection.html" >
<meta itemprop="name" content="Bo Clark Collection" >
<meta itemprop="productID" content="1194" >
<meta itemprop="description"
content="<html><body><div><p>Special eye-catcher: test.</p></body></html>" >
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="10,00 EUR" />
<meta itemprop="priceCurrency" content="EUR" />
<link itemprop="availability" href="http://schema.org/InStock" />
</span>
</span>
Microdata should be embedded in HTML, but tags with microdata in them can contain HTML. Description is a <meta> tag in your code though, so it does not need the HTML because it will never be displayed.
It looks like you are putting key structured data in non-visible tags, that's OK for currency, price, dates, but google states normally you should fit the microdata around your existing displayed data. The microdata can be in many different tags or block structures on the page, as long as they are nested under a single block structure (or a - but and seem most useful). Anything in HTML tags that don't have microdata will not cause problems - it just gets ignored when searching structured data.
Consider altering your code so the microdata is spread out, eg
<div itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="http://example.com/sales" />
<h3 itemprop="name">Bo Clark Collection</h3>
<img src.... >
<strong>Product code:</strong><span itemprop="productID">1194</span> (in stock)<link itemprop="availability" href="http://schema.org/InStock">
<br>
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">Price: <span itemprop="price">10,00</span><span itemprop="priceCurrency">EUR</span></span>
<div itemprop="description">
<p>Special eye-catcher: the silver Guess Wordmark test test.</p>
<ul><li>Silver Guess Wordmark</li>
<li>Leather in Croco-Style</li>
<li>Inner lining Suede</li>
<li>Tailor-made cutouts for ports and camera</li>
<li>Color: <span itemprop="color">Black</span></li></ul>
</div>
</div>
One piece of microdata can be embedded within another, as I've done here with color (Black) which is also part of Description. It works well for list items. Price done as above follows the google example of price.
Yes.
You should only use plain text instead of html tags. Refer to the Product schema example at https://developers.google.com/structured-data/rich-snippets/products
Just write in following pattern:
<p itemprop="description">Special eye-catcher: the silver Guess Wordmark test test. Silver Guess Wordmark. Leather in Croco-Style. Inner lining Suede. Tailor-made cutouts for ports and camera. Color: Black</p>
It is recommended to use plain text in description as Google shows that description in plain text on their SERPs. In my view, Google only displays description in plain text rather than italic, bold or underlined fashion so using tags like , and are irrelevant here.

<fb:comments> is displaying different layouts according to the href used inside. Why?

I'm trying to understand why two different layouts are displayed by the placeholder, according to the href parameter used inside of it. Quick example - say I'm using http://example.com/ as the href resource - I'll get the usual header before the comments, with the number of comments on the left and "Add a comment" on the right. However, when I'm changing the href to the one I really need (i.e. the page where the box resides), I only get a list of comments, no number of comments, no "add a comment". Have a look at this to see what I mean: http://popz.ro/comments.php?aid=1
Why, oh why? (something to do with the app I've registered?)
Thanks!
When I go to your link, I see a comments area as well as an input box to add new comments.
This appears to be correct based upon the plugin code used:
<fb:comments width="950" href="http://popz.ro/comments.php?aid=1"></fb:comments>
I also see you've got the og meta tags specificed too, which will help:
<meta property="og:title" content="Popz" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://popz.ro/comments.php?aid=1" />
<meta property="og:image" content="http://popz.ro/png/fpopz.png" />
<meta property="og:site_name" content="Popz | fresh de stiri" />
<meta property="fb:admins" content="584603173" />
<meta property="fb:app_id" content="277079292362391" />
Also the app_id matches between the FB.init() code as well as that specified in the meta tags. So there's no problem there.
I see only 2 comments, and the default is 2, so it's not going to show the # of comments until you go over that amount.