<html>
<head>
<title>Ajax PHP Example Supervisor ... thanks to https://www.w3schools.com/xml/ajax_php.asp - RJM Programming - November, 2022</title>
<meta name='viewport' content='width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes' >
<style>
#fname {
width: 40%;
background-color: #f0f0f0;
}
details {
width: 75%;
}
</style>
<script>
var pinks=['lightpink','#ffb6c1','pink','#ffc0cb','hotpink','#ff69b4','deeppink','#ff1493'];
var wo=null;
var curd='', curds=[], newcurd='';
var selval='';
var saveit=false;
var dosize=false;
var proposedu='';
var lcd=-1, lastlcd=-1;
var plist=[], qlist=[], iplist=0;
var nurl='//www.names.org/n/';
var gnurl='//www.thefreedictionary.com/';
var clickedurl='';
var snurl='/about';
nurl='//www.behindthename.com/name/';
snurl='';
function qget() {
pgetdelim(plist[iplist]);
}
function pgetdelim(str) {
var dselval=qlist[iplist];
//alert(dselval + ' str=' + str + '*' + iplist);
curd=decodeURIComponent(dselval.split('&delim=')[1]);
curds=[];
newcurd=curd;
var ddxmlhttp = new XMLHttpRequest();
ddxmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
curds=this.responseText.split(curd);
if (eval('' + curds.length) <= 1 && this.responseText.indexOf('<td><a href="/wiki/') != -1) {
curd='<td><a href="/wiki/';
dselval=dselval.split('&delim=')[0] + '&delim=' + encodeURIComponent(curd);
curds=this.responseText.split(curd);
}
if (eval('' + curds.length) <= 1) {
newcurd=prompt('Enter a URL ( ' + str.trim() + ' ) prefixing delimitation, presumably better than the suggestion, which was not found in the content.', curd);
if (newcurd == null) { newcurd=curd; }
if (newcurd.trim() != '' && newcurd != curd) { dselval=dselval.split('&delim=')[0] + '&delim=' + encodeURIComponent(newcurd); }
}
if (str.trim() != str) { devenso(qlist[iplist]); }
//alert('good');
iplist++;
if (eval('' + iplist) >= eval('' + qlist.length)) { pgetdelim(plist[iplist]); } else { qlist=[]; plist=[]; iplist=0; }
} else if (this.readyState == 4 && this.status == 0) {
//alert('bad ' + plist[0] + '*');
if (str.trim() != str) { devenso(qlist[iplist]); }
iplist++;
if (eval('' + iplist) >= eval('' + qlist.length)) { pgetdelim(plist[iplist]); } else { qlist=[]; plist=[]; iplist=0; }
}
};
ddxmlhttp.open("GET", str.trim().replace('http:','').replace('https:',''), true);
ddxmlhttp.send();
}
function getdelim(str) {
curd=decodeURIComponent(selval.split('&delim=')[1]);
curds=[];
newcurd=curd;
var dxmlhttp = new XMLHttpRequest();
dxmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
curds=this.responseText.split(curd);
if (eval('' + curds.length) <= 1 && this.responseText.indexOf('<td><a href="/wiki/') != -1) {
curd='<td><a href="/wiki/';
selval=selval.split('&delim=')[0] + '&delim=' + encodeURIComponent(curd);
curds=this.responseText.split(curd);
}
if (eval('' + curds.length) <= 1) {
newcurd=prompt('Enter a URL prefixing delimitation, presumably better than the suggestion, which was not found in the content.', curd);
if (newcurd == null) { newcurd=curd; }
if (newcurd.trim() != '' && newcurd != curd) { selval=selval.split('&delim=')[0] + '&delim=' + encodeURIComponent(newcurd); }
}
evenso();
}
};
dxmlhttp.open("GET", str.replace('http:','').replace('https:',''), true);
dxmlhttp.send();
if (eval('' + qlist.length) >= 1) { setTimeout(qget, 3000); }
}
function getpu(sone) {
var xsugg='';
if (proposedu != '') {
xsugg='<select style=background-color:yellow; title="Select to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(this.value.split(String.fromCharCode(32) + String.fromCharCode(40))[1].split(String.fromCharCode(41))[0].replace(/\\ /g,String.fromCharCode(95)),' + "'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
if (proposedu.indexOf('/wiki/') != -1) {
return proposedu.split('/wiki/')[0] + '/wiki/' + sone;
} else {
return proposedu + sone;
}
} else if (selval == '') {
xsugg='<select style=background-color:yellow; title="Select a name for a Name lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'' + nurl + encodeURIComponent(this.value.toLowerCase()) + snurl,'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
} else if (selval == '&RegEx=') { // https://en.wikipedia.org/wiki/
xsugg='<select style=background-color:yellow; title="Select a word for lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'' + gnurl + encodeURIComponent(this.value.toLowerCase()),'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
} else if (selval == '&capitals=') { // https://en.wikipedia.org/wiki/
xsugg='<select style=background-color:yellow; title="Select a Capital for a National capital lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//en.wikipedia.org/wiki/' + encodeURIComponent(this.value.split(' (')[0].replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
} else if (selval == '&hobbies=') { // https://en.wikipedia.org/wiki/
xsugg='<select style=background-color:yellow; title="Select a Hobby to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//en.wikipedia.org/wiki/' + encodeURIComponent(this.value.split(' (')[0].replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
} else if (selval == '&fruits=') { // https://en.wikipedia.org/wiki/
xsugg='<select style=background-color:yellow; title="Select a Fruit to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//simple.wikipedia.org/wiki/' + encodeURIComponent(this.value.replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
} else if (selval == '&vegetables=') { // https://en.wikipedia.org/wiki/
xsugg='<select style=background-color:yellow; title="Select a Vegetable to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//simple.wikipedia.org/wiki/' + encodeURIComponent(this.value.replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
return xsugg.split("window.open('")[1].split("'")[0] + sone;
}
return xsugg;
}
function showHint(str) {
var dsug="Suggestion";
var sugs=[];
var thr='';
var xsize='', xd=1;
if (dosize) { xsize=' size=' + xd + ' '; }
if (eval('' + str.length) >= 1 && (str + ' ').substring(0,1) == '/') {
var regs=str.split('/');
document.body.style.cursor='progress';
document.getElementById('fname').title='Regarding optional RegEx use please read from https://www.guru99.com/linux-regular-expressions.html (except that we want you to encase within / characters) else type for autocomplete list to display below';
if (eval('' + regs.length) <= 2) { return ''; }
//if (regs[2].trim() == '') { document.getElementById('fname').value+='i'; str+='i'; }
document.body.style.cursor='pointer';
}
if (8 == 8) {
if (selval.indexOf('&RegEx=') != -1 && eval('' + str.length) <= 1) {
if (eval('' + str.length) == 1) { document.body.style.cursor='progress'; }
return '';
} else if (selval.indexOf('&RegEx=') != -1) {
document.body.style.cursor='pointer';
}
}
if (str.length == 0) {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
thr=this.responseText;
if (this.responseText.replace('no suggestion', '') != '') {
//alert(this.responseText);
sugs=this.responseText.split(', ');
if (proposedu != '') {
dsug='<select style=background-color:yellow; title="Select to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(this.value.split(String.fromCharCode(32) + String.fromCharCode(40))[1].split(String.fromCharCode(41))[0].replace(/\\ /g,String.fromCharCode(95)),' + "'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '') {
dsug='<select style=background-color:yellow; title="Select a name for a Name lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'' + nurl + encodeURIComponent(this.value.toLowerCase()) + snurl,'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '&RegEx=') { // https://en.wikipedia.org/wiki/
dsug='<select style=background-color:yellow; title="Select a word for lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'' + gnurl + encodeURIComponent(this.value.toLowerCase()),'_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '&capitals=') { // https://en.wikipedia.org/wiki/
dsug='<select style=background-color:yellow; title="Select a Capital for a National capital lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//en.wikipedia.org/wiki/' + encodeURIComponent(this.value.split(' (')[0].replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '&hobbies=') { // https://en.wikipedia.org/wiki/
dsug='<select style=background-color:yellow; title="Select a Hobby to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//en.wikipedia.org/wiki/' + encodeURIComponent(this.value.split(' (')[0].replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '&fruits=') { // https://en.wikipedia.org/wiki/
dsug='<select style=background-color:yellow; title="Select a Fruit to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//simple.wikipedia.org/wiki/' + encodeURIComponent(this.value.replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
} else if (selval == '&vegetables=') { // https://en.wikipedia.org/wiki/
dsug='<select style=background-color:yellow; title="Select a Vegetable to lookup" id=ssug onchange="if (this.value.length != 0) { document.getElementById(' + "'fname'" + ').value=this.value.replace(/\\_/g,String.fromCharCode(32)); if (wo) { if (!wo.closed) { wo.close(); wo=null; } } wo=window.open(' + "'//simple.wikipedia.org/wiki/' + encodeURIComponent(this.value.replace(/\\ /g,'_')) + '','_blank','top=" + eval(screen.height * 0.2) + ",left=" + eval(screen.width * 0.5) + ",width=" + eval(screen.width * 0.5) + ",height=" + eval(screen.height * 0.7) + "');" + ' this.value=' + "''" + '; }"><option value=' + "''" + '>Suggestion</option></select>';
}
for (var jsug=0; jsug<sugs.length; jsug++) {
if (dsug.indexOf('>' + sugs[jsug].replace(/\_/g,' ') + '<') == -1 && proposedu == '') {
dsug=dsug.replace('</select>', '<option value="' + sugs[jsug] + '">' + sugs[jsug].replace(/\_/g,' ') + '</option></select>');
if (dosize) { xd++; xsize=' size=' + xd + ' '; }
} else if (dsug.indexOf('>' + sugs[jsug] + '<') == -1 && proposedu != '') {
dsug=dsug.replace('</select>', '<option value="' + sugs[jsug] + '">' + sugs[jsug] + '</option></select>');
if (dosize) { xd++; xsize=' size=' + xd + ' '; }
} else {
thr=thr.replace(', ' + sugs[jsug], '');
}
}
}
if (xsize != '') {
document.getElementById("dsug").innerHTML = dsug.replace('<select ', '<select ' + xsize + ' ');
} else {
document.getElementById("dsug").innerHTML = dsug;
}
if (proposedu == '') {
document.getElementById("txtHint").innerHTML = fancyize(thr.replace(/\_/g,' '));
} else {
document.getElementById("txtHint").innerHTML = fancyize(thr);
}
}
};
xmlhttp.open("GET", "gethint.php?q=" + str + selval, true);
xmlhttp.send();
}
}
function devenso(dselval) {
var sofar=('' + window.localStorage.getItem('selvalurl')).replace(/^null$/g,'').replace(/^undefined$/g,'');
if (sofar.trim() != '') {
window.localStorage.setItem('selvalurl', sofar + encodeURIComponent('?' + dselval));
} else {
window.localStorage.setItem('selvalurl', encodeURIComponent('' + dselval));
}
}
function evenso() {
if (saveit) {
saveit=false;
var sofar=('' + window.localStorage.getItem('selvalurl')).replace(/^null$/g,'').replace(/^undefined$/g,'');
if (sofar.trim() != '') {
window.localStorage.setItem('selvalurl', sofar + encodeURIComponent('?' + selval));
} else {
window.localStorage.setItem('selvalurl', encodeURIComponent('' + selval));
}
}
}
function doclickedurl(fio,thisp) {
if (document.getElementById('ssug') && thisp >= lastlcd) {
lcd=thisp;
lastlcd=thisp;
if (fio.innerText != '') {
var sects=document.getElementById('ssug').innerHTML.replace(/\_/g,' ').split('>' + fio.innerText.replace(/\_/g,' ') + ' ');
if (eval('' + sects.length) <= 1) {
sects=document.getElementById('ssug').innerHTML.replace(/\_/g,' ').split('>' + fio.innerText.replace(/\_/g,' '));
}
if (eval('' + sects.length) >= 2) {
clickedurl=getpu(sects[0].split(' value="')[eval(-1 + sects[0].split(' value="').length)].split('"')[0].split(' (')[0].replace(/\ /g,'_')); //sects[0].split(' value="')[eval(-1 + sects[0].split(' value="').length)].split('"')[0];
document.getElementById('ourcanvas').title="Click a bold word to left and then click here for Wikipedia images, " + ("as relevant ... " + clickedurl).replace(/\ \.\.\.\ $/g,'').replace(' //', ' http://');
}
}
}
}
function mydivptr() {
if (document.getElementById('addthis').value != '0') {
var gpick=0;
var nums=eval(Math.floor(Math.random() * eval('' + pinks.length)));
if (nums < 2) { nums=2; }
var sofar='linear-gradient(to right, white';
while (eval('' + nums) > 0) {
gpick=eval(Math.floor(Math.random() * eval('' + pinks.length)));
if (sofar.indexOf(', ' + pinks[gpick]) == -1) {
sofar+=', ' + pinks[gpick];
nums--;
//alert(sofar);
//} else {
//alert(' why sofar=' + sofar + ' and pinks[gpick]=' + pinks[gpick]);
}
}
sofar+=')';
document.getElementById('ourcanvas').style.background=sofar; //'linear-gradient(to right, white, lightpink, pink)';
//document.title=sofar;
setTimeout(mydivptr, 1000);
} else {
if (document.getElementById('ourcanvas')) { document.getElementById('ourcanvas').style.cursor='pointer'; }
}
}
function filltdright() {
var selovalue='';
if (clickedurl.toLowerCase().indexOf('wikipedia.') != -1 && clickedurl.indexOf('/wiki/') != -1) {
document.getElementById('ourcanvas').style.background='linear-gradient(to right, white, lightpink, pink)';
selovalue=clickedurl.split('/wiki/')[1];
document.getElementById('addthis').value='';
document.getElementById('ourcanvas').innerHTML='<iframe frameborder=0 style=display:none; src=/PHP/fgc/?tzexact=' + encodeURIComponent(selovalue.substring(0,1).toUpperCase() + selovalue.substring(1)) + '&tznickname=' + encodeURIComponent(selovalue.replace(/\_/g,' ')) + '></iframe>';
document.getElementById('ourcanvas').style.cursor='progress';
setTimeout(mydivptr, 1000);
}
}
function fancyize(insc) {
var outinsc=insc + ', ';
var csvs=insc.split(', ');
lcd=-1;
lastlcd=-1;
for (var jj=eval(-1 + csvs.length); jj>=0; jj--) {
if (csvs[jj].toLowerCase().indexOf(' (http') != -1) {
document.getElementById('ourcanvas').style.background='linear-gradient(to right, white, lightpink, deeppink)';
document.getElementById('ourcanvas').title="Click a bold word to left and then click here for Wikipedia images, " + ("as relevant ... " + clickedurl).replace(/\ \.\.\.\ $/g,'').replace(' //', ' http://');
outinsc=outinsc.replace(csvs[jj] + ', ', '<span id=infillflag title="Click to set the URL for pink area click" style=cursor:pointer; ontouchstart=doclickedurl(this,3); onmouseover=doclickedurl(this,1); onclick=doclickedurl(this,2);><strong><font color=blue>' + csvs[jj].split(' (')[0] + '</font></strong></span><font size=1> (<a target=_blank href="' + csvs[jj].split(' (')[1].split(')')[0] + '">' + csvs[jj].split(' (')[1].split(')')[0].replace('HTTP:','http:') + '</a>)</font>, ');
} else if (csvs[jj].indexOf(' (') != -1) {
document.getElementById('ourcanvas').style.background='linear-gradient(to right, white, lightpink, hotpink)';
document.getElementById('ourcanvas').title="Click a bold word to left and then click here for Wikipedia images, " + ("as relevant ... " + clickedurl).replace(/\ \.\.\.\ $/g,'').replace(' //', ' http://');
outinsc=outinsc.replace(csvs[jj] + ', ', '<span id=infillflag title="Click to set the URL for pink area click" style=cursor:pointer; ontouchstart=doclickedurl(this,3); onmouseover=doclickedurl(this,1); onclick=doclickedurl(this,2);><strong><font color=blue>' + csvs[jj].split(' (')[0] + '</font></strong></span><font size=1> (' + csvs[jj].split(' (')[1].split(')')[0] + ')</font>, ');
document.getElementById('infillflag').value=outinsc;
document.getElementById('mytz').submit();
} else {
if (getpu('').toLowerCase().indexOf('wikipedia.') != -1) {
document.getElementById('ourcanvas').style.background='linear-gradient(to right, white, lightpink, pink)';
document.getElementById('ourcanvas').title="Click a bold word to left and then click here for Wikipedia images, " + ("as relevant ... " + clickedurl).replace(/\ \.\.\.\ $/g,'').replace(' //', ' http://');
outinsc=outinsc.replace(csvs[jj] + ', ', '<span id=infillflag title="Click to set the URL for pink area click" style=cursor:pointer; ontouchstart=doclickedurl(this,3); onmouseover=doclickedurl(this,1); onclick=doclickedurl(this,2);><strong><font color=blue>' + csvs[jj] + '</font></strong></span>, ');
document.getElementById('infillflag').value=outinsc;
document.getElementById('mytz').submit();
} else {
document.getElementById('ourcanvas').style.backgroundColor='white';
document.getElementById('ourcanvas').title="";
outinsc=outinsc.replace(csvs[jj] + ', ', '<span id=infillflag data-title="Click to set the URL for pink area click" data-style=cursor:pointer; data-ontouchstart=doclickedurl(this,3); data-onmouseover=doclickedurl(this,1); data-onclick=doclickedurl(this,2);><strong><font color=blue>' + csvs[jj] + '</font></strong></span>, ');
}
}
}
return outinsc.replace(/\,\ $/g,'');
}
function selvalit(selo) {
saveit=false;
proposedu='';
document.getElementById('fname').value='';
if (selo.value == 'RegEx') {
document.getElementById('fname').placeholder='/^[a-b]an.n.$/ ... matches on banana';
document.getElementById('fname').title='Regarding optional RegEx use please read from https://www.guru99.com/linux-regular-expressions.html (except that we want you to encase within / characters) else type for autocomplete list to display below';
} else {
document.getElementById('fname').title='Type for autocomplete list to display below';
document.getElementById('fname').placeholder='';
}
document.getElementById('txtHint').innerHTML='';
if (document.getElementById('ssug')) {
document.getElementById('ssug').size=1;
document.getElementById('ssug').innerHTML='<option value="">Suggestion</option>';
document.getElementById('ssug').value='';
}
if (selo.value.trim() == '') {
if (selo.value != '') {
proposedu=' ';
while (proposedu.trim() == '' && proposedu != proposedu.trim()) {
proposedu=prompt('Please enter a "List of" type of URL (and add blank(s) to remember for the future, where just blanks deletes all remembered URLs and a URL list can be comma separated) eg. http://en.wikipedia.org/wiki/List_of_rivers', '');
if (proposedu == null) { proposedu=''; }
if (proposedu.trim() == '' && proposedu.trim() != proposedu) {
if (('' + window.localStorage.getItem('selvalurl')).replace(/^null$/g,'').replace(/^undefined$/g,'').trim() != '') {
window.localStorage.removeItem('selvalurl');
}
}
}
if (proposedu.trim() != '' && proposedu.trim() != proposedu) {
if (proposedu.indexOf(',') != -1) {
var pls=proposedu.trim().split(',');
proposedu=pls[eval(-1 + pls.length)];
plist=[];
qlist=[];
iplist=0;
for (var ikj=0; ikj<eval(-1 + pls.length); ikj++) {
proposedu=pls[ikj].trim();
selval='&' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','') + '=' + encodeURIComponent(proposedu) + '&delim=' + encodeURIComponent('<li><a href="/wiki/');
document.getElementById('stopics').innerHTML+='<option value="' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '" data-selval="' + selval + '">' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(0,1).toUpperCase() + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(1) + '</option>';
document.getElementById('stopics').value=proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','');
plist.push(pls[ikj].trim() + ' ');
qlist.push(selval);
}
proposedu=pls[eval(-1 + pls.length)].trim();
} else {
proposedu=proposedu.trim();
}
saveit=true;
setTimeout(evenso, 5000);
} else if (proposedu.indexOf(',') != -1) {
var xpls=proposedu.trim().split(',');
proposedu=xpls[eval(-1 + pls.length)];
plist=[];
qlist=[];
iplist=0;
for (var ikjj=0; ikjj<eval(-1 + xpls.length); ikjj++) {
proposedu=xpls[ikjj].trim();
selval='&' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '=' + encodeURIComponent(proposedu) + '&delim=' + encodeURIComponent('<li><a href="/wiki/');
document.getElementById('stopics').innerHTML+='<option value="' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '" data-selval="' + selval + '">' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(0,1).toUpperCase() + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(1) + '</option>';
document.getElementById('stopics').value=proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','');
plist.push(xpls[ikjj].trim());
qlist.push(selval);
}
proposedu=pls[eval(-1 + pls.length)].trim();
}
selval='&' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '=' + encodeURIComponent(proposedu) + '&delim=' + encodeURIComponent('<li><a href="/wiki/');
document.getElementById('stopics').innerHTML+='<option value="' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '" data-selval="' + selval + '">' + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(0,1).toUpperCase() + proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(1) + '</option>';
document.getElementById('stopics').value=proposedu.split('/')[eval(-1 + proposedu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','');
getdelim(proposedu);
}
if (proposedu == '') {
selval=selo.value.trim();
}
} else if (document.getElementById('stopics').innerHTML.indexOf(' value="' + selo.value.trim() + '" data-selval="') != -1) {
selval=document.getElementById('stopics').innerHTML.split(' value="' + selo.value.trim() + '" data-selval="')[1].split('"')[0];
proposedu=decodeURIComponent(selval.substring(1).split('=')[1].split('&')[0]);
getdelim(proposedu);
} else {
selval='&' + selo.value.trim() + '=';
}
document.getElementById('fname').focus();
}
function stmore() {
var pu='';
var fsofar=decodeURIComponent(('' + window.localStorage.getItem('selvalurl')).replace(/^null$/g,'').replace(/^undefined$/g,''));
if (fsofar.trim() != '') {
var fsfs=fsofar.split('?');
for (var ifs=0; ifs<fsfs.length; ifs++) {
//alert(fsofar);
pu=decodeURIComponent(fsfs[ifs].split('=')[1].split('&')[0]);
//alert(pu);
document.getElementById('stopics').innerHTML+='<option value="' + pu.split('/')[eval(-1 + pu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists of ','') + '" data-selval="' + fsfs[ifs] + '">' + pu.split('/')[eval(-1 + pu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(0,1).toUpperCase() + pu.split('/')[eval(-1 + pu.split('/').length)].split('?')[0].split('#')[0].replace(/\ /g,'_').replace('List_of_','').replace('Lists_of_','').replace(/\_/g,' ').substring(1) + '</option>';
}
}
}
function toggle(ao) {
if (ao.innerHTML == '-') {
dosize=true;
ao.innerHTML='+';
ao.title='Concertina yellow dropdown';
} else {
dosize=false;
ao.innerHTML='-';
ao.title='Expand yellow dropdown';
if (document.getElementById('ssug')) {
document.getElementById('ssug').size=1;
}
}
}
</script>
</head>
<body onload="if (window.self !== window.top) { selval=selval; } else { document.getElementById('fname').focus(); } stmore();">
<table style=width:100%;><tr><td><h2>Name Selector ... Largely based <br>on <a target=_blank title='https://www.w3schools.com/xml/ajax_php.asp' href='https://www.w3schools.com/xml/ajax_php.asp'>AJAX PHP Example</a>, thanks</h2>
<details><summary>With /usr/share/dict/propernames intervention</summary><h3>With /usr/share/dict/propernames intervention</h3><br><p style=background-color:#f0f0f0;>Regarding pink area, click a bold word to the left of pink and then click in the pink for Wikipedia images, as relevant. <br><br>Regarding optional RegEx use in the grey textbox below please read from <a target=_blank title='https://www.guru99.com/linux-regular-expressions.html' href='//www.guru99.com/linux-regular-expressions.html'>https://www.guru99.com/linux-regular-expressions.html</a> (except that we want you to encase within / characters) else type for autocomplete list to display further below. An example First name in RegEx could be finding Barry via /^Ba.r.$/</p></details>
<h4>RJM Programming <a style='cursor:pointer;' onclick='toggle(this);' id=assize title='Expand yellow dropdown'>-</a> November, 2022</h4>
<p><b>Start typing a name in the input field below:</b></p>
<form>
<select id=stopics onchange=selvalit(this); style=display:inline-block;><option value=''>First name</option><option value='RegEx'>Crossword helper</option><option value='capitals'>National capital</option><option value='hobbies'>Hobby</option><option value='fruits'>Fruit</option><option value='vegetables'>Vegetable</option><option value=' '>Your own ...</option></select><span style=display:inline-block;>: </span><input title="Regarding optional RegEx use please read from https://www.guru99.com/linux-regular-expressions.html (except that we want you to encase within / characters) else type for autocomplete list to display below" placeholder="" id=fname type="text" onkeyup="showHint(this.value)">
</form>
<p><div id=dsug style=display:inline-block;vertical-align:top;>Suggestions</div><span style=display:inline-block;vertical-align:top;>: </span><span id="txtHint" style=display:inline-block;width:40%;word-wrap:break-word;></span></p>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br><br><br>
<br><br>
</td><td title="Click a bold word to left and then click here for Wikipedia images, as relevant" id=ourcanvas style="background:linear-gradient(to right, white, lightpink, pink);width:50%; onclick=filltdright();" onmouseover="if (lcd >= 2) { filltdright(); }" ontouchend="if (lcd >= 3) { filltdright(); }"></td></tr></table>
<iframe id=istz name=istz style=display:none; src='/PHP/tz_places.php'></iframe><
<form id=mytz target=istz action=/PHP/tz_places.php method=POST style=display:none;>
<input name=infillflag id=infillflag type=hidden value=''></input><input type=submit style=display:none; value=Submit id=istzsub></input></form>
<div id=stz style=display:none;></div><input id=addthis type=hidden value=''></input>
</body>
</html>