X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fqtextstring;h=84564df55205125a2bbad3deac5611b256167582;hb=66482684911b5a12a5182797de54a24c2b31c29a;hp=400716f119556e6bc0c893c82b5314ba6ac6206c;hpb=3766fb8d851fe463a5b8b469cf148c28efb1c578;p=ypp-sc-tools.db-live.git
diff --git a/yarrg/web/qtextstring b/yarrg/web/qtextstring
index 400716f..84564df 100644
--- a/yarrg/web/qtextstring
+++ b/yarrg/web/qtextstring
@@ -29,20 +29,27 @@
sponsored by Three Rings.
- This Mason component handles `live' analysis of text string entries.
+ This Mason component handles analysis of text string entries, including
+ both the AJAX calls from web page javascript and the entry validation
+ and processing calls from other components.
%doc>
<%args>
-$thingstring
$qa => $m->caller_args(1)->{'qa'}
+$dbh
+$thingstring
+$emsgstore
+$perresult
%args>
-
-Enter route (islands, or archipelagoes, separated by |s or commas;
- abbreviations are OK):
+<%perl>
+my $stringval= $qa->{$thingstring};
+$stringval='' if !defined $stringval;
+%perl>
<&| script &>
-ts_uri= "check_<% $thingstring %>?format=json&type=text/xml"
+ts_uri= "qtextstringcheck?format=application/json&ctype=text/xml"
+ + "&what=<% $thingstring %>"
+ "&ocean=<% uri_escape($qa->{Ocean}) %>";
ts_timeout=false;
@@ -80,13 +87,29 @@ function ts_Ready() {
ts_request= false;
ts_Request();
}
-window.onload= ts_Needed;
+register_onload(ts_Needed);
&script>
content %>
id="<% $thingstring %>" name="<% $thingstring %>"
onchange="ts_Needed();" onkeyup="ts_Later();"
- value="<% $qa->{$thingstring} |h %>"
+ value="<% $stringval |h %>"
>