X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;ds=sidebyside;f=yarrg%2Fweb%2Fqtextstring;h=e046c56c3d4f90c7fe4b3034836015ca64e73879;hb=ad29b01fe6470a4b3bb108a8f485657927175e24;hp=d57f863490fda37637957afd0e988be1e1c4f14d;hpb=4c6a28f4cbed2ed351697f63f30fb4827259f6a9;p=ypp-sc-tools.main.git
diff --git a/yarrg/web/qtextstring b/yarrg/web/qtextstring
index d57f863..e046c56 100644
--- a/yarrg/web/qtextstring
+++ b/yarrg/web/qtextstring
@@ -40,7 +40,7 @@ $qa => $m->caller_args(1)->{'qa'}
$dbh
$thingstring
$emsgstore
-$perresult
+$onresults
$prefix => 'ts';
$helpref => undef;
%args>
@@ -49,6 +49,9 @@ my $stringval= $qa->{$thingstring};
$stringval='' if !defined $stringval;
my $p= $prefix.'_';
+my $checker= $m->fetch_comp("check_${thingstring}");
+my $significant_nonempty= $checker->attr_exists('significant_nonempty');
+
%perl>
<&| script &>
@@ -58,7 +61,7 @@ my $p= $prefix.'_';
<%$p%>timeout=false;
<%$p%>request=false;
-<%$p%>done='';
+<%$p%>done=<% $significant_nonempty ? "null" : "''" %>;
<%$p%>needed='';
function <%$p%>Later(){
window.clearTimeout(<%$p%>timeout);
@@ -94,6 +97,7 @@ function <%$p%>Ready() {
register_onload(<%$p%>Needed);
&script>
+% if (!printable($m)) {
content %>
id="<% $thingstring %>" name="<% $thingstring %>"
onchange="<%$p%>Needed();" onkeyup="<%$p%>Later();"
@@ -101,10 +105,15 @@ register_onload(<%$p%>Needed);
><% defined($helpref) ? "[?]" : '' %>