# HG changeset patch # User Adam Chlipala # Date 1258836488 18000 # Node ID dcc6093e9575ac94f6bb59f47263afe28dd4f6fd # Parent 83d8ddd09d95f38338ac871ce12b3074e856d4e3 Get message-passing working in IE6 diff -r 83d8ddd09d95 -r dcc6093e9575 lib/js/urweb.js --- a/lib/js/urweb.js Sat Nov 21 14:29:35 2009 -0500 +++ b/lib/js/urweb.js Sat Nov 21 15:48:08 2009 -0500 @@ -487,7 +487,7 @@ function ts(x) { return x.toString() } function bs(b) { return (b ? "True" : "False") } -function sub(s, i) { return s[i]; } +function sub(s, i) { return s.charAt(i); } function suf(s, i) { return s.substring(i); } function slen(s) { return s.length; } function sidx(s, ch) { @@ -499,7 +499,7 @@ } function sspn(s, chs) { for (var i = 0; i < s.length; ++i) - if (chs.indexOf(s[i]) != -1) + if (chs.indexOf(s.charAt(i)) != -1) return i; return null; @@ -550,14 +550,14 @@ function uf(s) { if (s.length == 0) return "_"; - return (s[0] == '_' ? "_" : "") + return (s.charAt(0) == '_' ? "_" : "") + escape(s).replace(new RegExp ("/", "g"), "%2F").replace(new RegExp ("\\+", "g"), "%2B"); } function uu(s) { - if (s.length > 0 && s[0] == '_') + if (s.length > 0 && s.charAt(0) == '_') { s = s.substring(1); - else if (s.length >= 3 && s[0] == '%' && s[1] == '5' && (s[2] == 'f' || s[2] == 'F')) + } else if (s.length >= 3 && s.charAt(0) == '%' && s.charAt(1) == '5' && (s.charAt(2) == 'f' || s.charAt(2) == 'F')) s = s.substring(3); return unescape(s.replace(new RegExp ("\\+", "g"), " ")); } @@ -657,7 +657,7 @@ } function path_join(s1, s2) { - if (s1.length > 0 && s1[s1.length-1] == '/') + if (s1.length > 0 && s1.charAt(s1.length-1) == '/') return s1 + s2; else return s1 + "/" + s2; @@ -754,6 +754,8 @@ } } + xhr.abort(); + connect(); } else { diff -r 83d8ddd09d95 -r dcc6093e9575 src/c/urweb.c --- a/src/c/urweb.c Sat Nov 21 14:29:35 2009 -0500 +++ b/src/c/urweb.c Sat Nov 21 15:48:08 2009 -0500 @@ -672,6 +672,8 @@ } int uw_set_input(uw_context ctx, const char *name, char *value) { + printf("Input name %s\n", name); + if (!strcasecmp(name, ".b")) { int n = uw_input_num(value); input *inps; @@ -760,6 +762,8 @@ int n = uw_input_num(name); if (n < 0) { + if (!strcmp(name, "null")) + return 0; uw_set_error(ctx, "Bad input name %s", name); return -1; } diff -r 83d8ddd09d95 -r dcc6093e9575 src/cjr_print.sml --- a/src/cjr_print.sml Sat Nov 21 14:29:35 2009 -0500 +++ b/src/cjr_print.sml Sat Nov 21 15:48:08 2009 -0500 @@ -2575,16 +2575,16 @@ end, string "\");", newline, - string "uw_set_needs_push(ctx, ", - string (case side of - ServerAndPullAndPush => "1" - | _ => "0"), - string ");", - newline, string "uw_set_url_prefix(ctx, \"", string (Settings.getUrlPrefix ()), string "\");", newline]), + string "uw_set_needs_push(ctx, ", + string (case side of + ServerAndPullAndPush => "1" + | _ => "0"), + string ");", + newline, string "uw_set_needs_sig(ctx, ", string (if couldWrite ek then "1"