<html>
<head>
<title>Onclick Event Propagation - RJM Programming - March, 2023</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<style>
details { display: flex; }
table { font-size: 12px; }
td { background-image: linear-gradient(#f0f0f0, #f2f2f2, #f4f4f4, #f6f6f6, #f8f8f8, #fafafa); }
select { background-image: linear-gradient(#fff0f0, #fff2f2, #fff4f4, #fff6f6, #fff8f8, #fffafa); }
#actionsel { background-image: linear-gradient(#fff0ff, #fff2ff, #fff4ff, #fff6ff, #fff8ff, #fffaff); }
input[type=checkbox] { // thanks to https://stackoverflow.com/questions/2460501/how-to-change-checkboxs-border-style-in-css
-webkit-box-shadow: 0px 0px 0px 1px rgba(255,0,0,1);
-moz-box-shadow: 0px 0px 0px 1px rgba(255,0,0,1);
box-shadow: 0px 0px 0px 1px rgba(255,0,0,1);
}
button { background-image: linear-gradient(#f0f0ff, #f2f2ff, #f4f4ff, #f6f6ff, #f8f8ff, #fafaff); padding: 10 10 10 10; }
</style>
<script type='text/javascript'>
// Thanks to Behind Me Dips Eternity, by Emily Dickinson
// Thanks to https://sites.google.com/site/examplesinpoetry/sestet-poetry-example-definition

var numtype='';
var numtypes=[];
var saveuntil=2000;
var touches=[];
var wasscale=1.0, isscale=1.0;
var ote='';
var detsuffix='</summary>';
var blurbsuffix='</details>';
var detnum=0;
var noway=false;
var lastajax='', lasturl='', lasturls=[], waithere=false;
var idc=0, jdc=0;
var idfound=false;
var blurb='', rawhtml='';
var ilots=0;
var myxhr=null;
var thisa='';
var wos=[null, null, null, null, null, null];
var wosurl=['', '', '', '', '', ''];
var cindxs="button:0,td:1,tr:2,tbody:3,table:4,body:5";
var indxs=["button:0", "td:1", "tr:2", "tbody:3", "table:4", "body:5"];
var cols=["#f0f0f0", "#f2f2f2", "#f4f4f4", "#f6f6f6", "#f8f8f8", "#fafafa"];

// Thanks to https://bilingualkidspot.com/2018/04/23/popular-nursery-rhymes-for-kids-english/

var lotsofsix=["<br>O mistress mine, where are you roaming?;<br>It was many and many a year ago,;<br>Behind Me .. dips Eternity ..;<br>There was a farmer who had a dog,;<br>Five little ducks;<br>That well I deem each mountain, wood and plain,",
"O stay and hear! your true-love's coming ;In a kingdom by the sea,;Before Me .. Immortality ..;And Bingo was his name-O.;Went out one day;And river knows, what I from man conceal,",
"That can sing both high and low;That a maiden there lived whom you may know;Myself .. the Term between ..;B-I-N-G-O!;Over the hill and far away;What dreary hues my life's fond prospects dim.",
"Trip no further, pretty sweeting,;By the name of ANNABEL LEE;Death but the Drift of Eastern Gray,;B-I-N-G-O!;Mother duck said;Yet whate'er wild or savage paths I've ta'en,",
"Journey's end in lovers' meeting-- ;And this maiden she lived with no other thought;Dissolving into Dawn away,;B-I-N-G-O!;'Quack, quack, quack, quack.';Where'er I wander, love attends me still,",
"Every wise man's son doth know.;Than to love and be loved by me.;Before the West begin ..;And Bingo was his name-O!;But only four little ducks came back.;Soft whisp'ring to my soul, and I to him."];

function dalert() {
var thata='';
if (thisa != '') {
thata=thisa;
thisa='';
alert(thata);
}
}

function thisalert(inb) {
thisa=inb;
setTimeout(dalert, 4000);
}

function tableize(what) {
var dih=document.getElementById('results').innerHTML, trih='';
if (document.getElementById('results').innerHTML.indexOf('<table') == -1) {
what='<table cellpadding=20 cellspacing=20><tbody><tr id=mywhat><td>' + what + '</td></tr></tbody></table>';
} else if (!idfound) {
//alert('what=' + what + ' and ' + dih.replace('</tr>', '<td>' + what + '</td></tr>'));
if (1 == 1) {
trih=document.getElementById('mywhat').innerHTML;
//alert(": " + '<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>');
//if (trih.indexOf('<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>') == -1) {
// if (1 == 2) { alert('<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary> not found in ' + trih); }
//} else if (trih.replace('' + '<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>','<summary></summary>') == trih.replace('' + '<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>','<summary></summary>').replace(/\<td\>\<br\>\<br\>\<details[^>]+\>\<summary\>\<\/summary\>[^/]+\/details\>\<\/td\>/g, '')) {
// alert('<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>' + ' ... did not find in ' + trih.replace('' + '<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>','<summary></summary>'));
//}
//trih=trih.replace(/\<td\>\<br\>\<br\>\<details[^>]+\<summary\>\<\/summary\>[^/]+\/details\>\<\/td\>/g, '');
document.getElementById('mywhat').innerHTML='<td>' + what + '</td>' + trih.replace('' + '<summary' + what.split('<summary')[1].split('</summary>')[0] + '</summary>','<summary></summary>').replace(/\<td\>\<br\>\<br\>\<details[^>]+\<summary\>\<\/summary\>[^/]+\/details\>\<\/td\>/g, '');
trih=document.getElementById('mywhat').innerHTML;
if (trih != trih.replace(/\<td\>\<br\>\<br\>\<details[^>]+\>\<summary\>\<\/summary\>[^/]+\/details\>\<\/td\>/g, '')) {
trih=trih.replace(/\<td\>\<br\>\<br\>\<details[^>]+\>\<summary\>\<\/summary\>[^/]+\/details\>\<\/td\>/g, '');
document.getElementById('mywhat').innerHTML=trih;
}
//alert(document.getElementById('results').innerHTML);
} else {
document.getElementById('results').innerHTML=dih.replace('</tr>', '<td>' + what + '</td></tr>');
}
return '';
}
return what;
}

function delayedalert() {
console.log('Here at delayedalert ' + lasturls.length);
var ok=true;
for (var iii=0; iii<lasturls.length; iii++) {
ok=true;
jdc=iii;
for (var i=0; i<wosurl.length; i++) {
if (wosurl[i].indexOf(lasturls[iii]) != -1) { ok=false; }
}
if (ok) {
if (wos[jdc]) {
if (!wos[jdc].closed) {
wos[jdc].close();
}
}
wosurl[jdc]=lasturls[iii];
wos[jdc]=window.open(lasturls[iii], '_blank', 'top=' + eval(eval(-600 - jdc*10) + eval('' + screen.height)) + ',left=' + eval(eval(-600 - jdc*10) + eval('' + screen.width)) + ',width=600,height=600');
}
}
lasturls=[];
waithere=false;
}

function ouralert(ins) {
var ok=true;
if (ins == '' && lasturl != '') {
if (waithere) {
if (eval('' + lasturls.length) == 0) {
setTimeout(delayedalert, 5000);
lasturls.push(lasturl);
console.log('Pushed ' + lasturl);
} else {
lasturls.push(lasturl);
console.log('pushed ' + lasturl);
}
return '';
}
for (var i=0; i<wosurl.length; i++) {
if (wosurl[i].indexOf(lasturl) != -1) { ok=false; }
}
if (ok) {
if (wos[jdc]) {
if (!wos[jdc].closed) {
wos[jdc].close();
}
}
wosurl[jdc]=lasturl;
wos[jdc]=window.open(lasturl, '_blank', 'top=' + eval(eval(-600 - jdc*10) + eval('' + screen.height)) + ',left=' + eval(eval(-600 - jdc*10) + eval('' + screen.width)) + ',width=600,height=600');
}
//lasturl='';
} else {
if (wos[jdc]) {
if (!wos[jdc].closed) {
wos[jdc].close();
}
}
wos[jdc]=window.open('', '_blank', 'top=50,left=50,width=600,height=600');
wos[jdc].document.write(ins);
}
}

function stateChanged() {
if (myxhr.readyState == 4) {
if (myxhr.status == 200) {
console.log('myxhr=' + myxhr);
rawhtml = myxhr.response;
ouralert(rawhtml);
}
}
}


function ajaxit(parturl) {
myxhr = new XMLHttpRequest();
if (myxhr) {
if (1 == 11) {
myxhr.open('GET', '//www.thoughtco.com/search?q=' + encodeURIComponent(parturl), true);
myxhr.onreadystatechange=stateChanged;
myxhr.send(null);
} else if (1 == 1) {
if (lasturl != '//www.google.com/search?q=' + encodeURIComponent(parturl)) {
lasturl='//www.google.com/search?q=' + encodeURIComponent(parturl);
ouralert('');
}
} else {
var xurl = './getme.php';
var formis = new FormData();
if (myxhr) {
// https://www.google.com/search?q=mary+had&sxsrf=APwXEdd8WBBsDjbjGl2EFNFASHbQnV9rNw%3A1679888964273&source=hp&ei=RBIhZJntDqrK2roPy6KWwA0&iflsig=AOEireoAAAAAZCEgVHCla3RdkWinrVGkAaOlMAyaTEbX&ved=0ahUKEwiZn-eHmvv9AhUqpVYBHUuRBdgQ4dUDCAo&uact=5&oq=mary+had&gs_lcp=Cgdnd3Mtd2l6EAMyBAgjECcyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQyBQgAEIAEMgUIABCABDIFCAAQgAQ6CwgAEIAEELEDEIMBOhEILhCABBCxAxCDARDHARDRAzoOCC4QigUQsQMQgwEQ1AI6CwguEIoFELEDEIMBOggILhCABBCxAzoOCC4QgAQQsQMQgwEQ1AI6CwgAEIoFELEDEIMBOgUILhCABDoLCC4QgAQQxwEQrwE6DgguEIAEELEDEMcBEK8BOgsILhCABBCxAxDUAjoRCC4QigUQsQMQgwEQxwEQrwE6CAgAEIAEELEDOggILhCABBDUAjoLCC4QgAQQsQMQgwFQAFjKDWCAD2gAcAB4AIABgwKIAdwLkgEFMC43LjGYAQCgAQE&sclient=gws-wiz
formis.append('q', 'http://www.google.com/search?q=' + encodeURIComponent(parturl));
myxhr.open('POST', xurl); //, true);
myxhr.onreadystatechange=stateChanged;
myxhr.send(formis);
}
}
}
}

function commonev(othis) {
//saveuntil=2000;
if (numtype == '') { numtype='' + event.type + ':' + ('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] + ':' + ('' + othis.outerHTML).substring(1).split(' ')[0].split('>')[0]; } else { numtype+=',' + event.type + ':' + ('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] + ':' + ('' + othis.outerHTML).substring(1).split(' ')[0].split('>')[0]; }
console.log('numtype=' + numtype + ' ' + ('' + new Date()));
numtypes=numtype.split(',');
if (saveuntil == 2000) { setTimeout(assesslater, 100); }
if (eval('' + jdc) >= eval('' + lotsofsix.length)) { jdc=0; }
jdc=Math.floor(Math.random() * lotsofsix.length);
if ((',' + cindxs + ',').indexOf(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':') != -1) {
if (lastajax != lotsofsix[jdc].split(';')[eval((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0])].replace(/\<br\>/g, String.fromCharCode(10))) {
lastajax=lotsofsix[jdc].split(';')[eval((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0])].replace(/\<br\>/g, String.fromCharCode(10));
ajaxit(lotsofsix[jdc].split(';')[eval((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0])].replace(/\<br\>/g, String.fromCharCode(10)));
}
}
}

function ttlook() {
var tspecific=' pinch';
if (wasscale > isscale) {
tspecific=' Pinch';
} else if (isscale > wasscale) {
tspecific=' Spread';
} else if (eval('' + ote.split(':').length) >= 5) {
if (eval(ote.split(':')[1].split(',')[0].trim()) > eval(ote.split(':')[3].split(',')[0].trim())) {
if (eval(ote.split(':')[1].split(',')[1].split(' ')[0].trim()) <= eval(ote.split(':')[3].split(',')[1].split(' ')[0].trim())) {
tspecific=' spread';
}
} else if (eval(ote.split(':')[1].split(',')[0].trim()) < eval(ote.split(':')[3].split(',')[0].trim())) {
if (eval(ote.split(':')[1].split(',')[1].split(' ')[0].trim()) >= eval(ote.split(':')[3].split(',')[1].split(' ')[0].trim())) {
tspecific=' spread';
}
}
} else {
tspecific='';
}
document.getElementById('numbers').innerHTML='of touch' + tspecific + ' gesture ';
document.getElementById('numberst').innerHTML='of touch' + tspecific + ' gesture ';
//document.getElementById('numbers').innerHTML+=ote; //('(' + event.targetTouches.length + ') ' + event.targetTouches[0].clientX + ',' + event.targetTouches[0].clientY + ' to ' + event.targetTouches[1].clientX + ',' + event.targetTouches[1].clientY);
ote='';
}

function assesslater() {
saveuntil-=100;
if (saveuntil > 0) {
setTimeout(assesslater, 100);
} else {
if (numtype.indexOf(',') != -1 || numtype.indexOf('touch') != -1) { // multiple event analysis
document.getElementById('numberst').innerHTML='';
var numtypeslength=numtypes.length;
for (var ii=0; ii<eval(-1 + numtypes.length); ii++) {
if (numtypes[eval(-1 + numtypes.length)] != numtypes[ii]) { numtypeslength--; }
}
//if (numtypes[0] == numtypes[1]) {
// document.getElementById('myh1').innerHTML+=' Multiple event ' + numtypes[0] + ' ' + ('' + new Date());
//}
if (numtypes[eval(-1 + numtypes.length)].indexOf('dblclick') != -1) {
if (numtypes[eval(-1 + numtypes.length)].split(':')[2] == numtypes[eval(-2 + numtypes.length)].split(':')[2]) {
document.getElementById('numbers').innerHTML='of programmed for double click';
} else {
document.getElementById('numbers').innerHTML='of quick programmed for propagated clicking';
}
} else if (numtypes[eval(-1 + numtypes.length)].indexOf('click') != -1) {
if (numtypes[eval(-1 + numtypes.length)] == numtypes[eval(-2 + numtypes.length)]) {
document.getElementById('numbers').innerHTML='of programmed for discrete ' + numtypeslength + 'x clicking';
} else if (numtypes[eval(-1 + numtypes.length)].split(':')[2] == numtypes[eval(-2 + numtypes.length)].split(':')[2]) {
document.getElementById('numbers').innerHTML='of programmed for click';
} else {
document.getElementById('numbers').innerHTML='of fast programmed for propagated clicking';
}
} else if (numtypes[eval(-1 + numtypes.length)].indexOf('contextmenu') != -1) {
if (numtypes[eval(-1 + numtypes.length)] == numtypes[eval(-2 + numtypes.length)]) {
document.getElementById('numbers').innerHTML='of programmed for discrete ' + numtypeslength + 'x right clicking';
} else if (numtypes[eval(-1 + numtypes.length)].split(':')[2] == numtypes[eval(-2 + numtypes.length)].split(':')[2]) {
document.getElementById('numbers').innerHTML='of programmed for right click';
} else {
document.getElementById('numbers').innerHTML='of fast programmed for propagated right clicking';
}
} else if (numtypes[eval(-1 + numtypes.length)].indexOf('mouseo') != -1) {
if (numtypes[eval(-1 + numtypes.length)] == numtypes[eval(-2 + numtypes.length)]) {
document.getElementById('numbers').innerHTML='of programmed for discrete ' + numtypeslength + 'x hovering';
} else if (numtypes[eval(-1 + numtypes.length)].split(':')[2] == numtypes[eval(-2 + numtypes.length)].split(':')[2]) {
document.getElementById('numbers').innerHTML='of programmed for hovering';
} else {
document.getElementById('numbers').innerHTML='of fast programmed for roaming type of hovering';
}
} else if (numtypes[eval(-1 + numtypes.length)].indexOf('touchend') != -1) {
ttlook();
document.getElementById('numberst').innerHTML=document.getElementById('numbers').innerHTML;
} else {
document.getElementById('numbers').innerHTML='';
document.getElementById('numberst').innerHTML='';
}
}
numtype='';
numtypes=[];
saveuntil=2000;
}
}

function moi(othis) {
var extras='';


switch ('' + event.type) {
case 'contextmenu':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'dblclick':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'mouseover':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'mousedown':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'mouseoout':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'touchstart': // thanks to https://stackoverflow.com/questions/15240946/retrieving-touchstart-coordinates-in-a-touchend-event
try {
wasscale=eval('' + window.visualViewport.scale);
} catch(exgf) { wasscale=1.0; }
var touchList = event.changedTouches;
var touch;
for (var i = 0; i < touchList.length; i++) {
ote=("startX: " + touchList[i].screenX + "," + + touchList[i].screenY + " id: " + touchList[i].identifier + " ");
touch = {x: touchList[i].screenX, y: touchList[i].screenY, id: touchList[i].identifier};
touches.push(touch);
}
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
waithere=true;
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'touchdown':
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
waithere=true;
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'touchend': // thanks to https://stackoverflow.com/questions/15240946/retrieving-touchstart-coordinates-in-a-touchend-event
try {
isscale=eval('' + window.visualViewport.scale);
} catch(exsgf) { isscale=1.0; }
var touchList = event.changedTouches;
var touch;
for (var i = 0; i < touchList.length; i++) {
touch = {x: touchList[i].screenX, y: touchList[i].screenY, id: touchList[i].identifier};
for (var j = touches.length - 1; j >= 0 ; j--) {
if (touches[j].id == touch.id) {
touches.splice(j, 1);
} else {
ote+=(" endX: "+ touches[j].x + "," + + touches[j].y + " id: " + touchList[i].identifier);
}
}
}
if (document.getElementById('mycbomo').checked && document.getElementById('eventtype').value == ('' + event.type)) {
waithere=true;
//ote=' huh ';
//try {
//ote+='(' + event.touches.length + ') ';
//} catch(etr) { }
//try {
//ote+='' + event.touches[0].clientX + ',' + event.touches[0].clientY + ' to ' + event.touches[1].clientX + ',' + event.touches[1].clientY;
//} catch(etrd) { }
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
commonev(othis);
}
break;

case 'click':
//saveuntil=2000;
if (document.getElementById('actionsel').value.indexOf('preventDefault') != -1) { event.preventDefault(); }
if (document.getElementById('actionsel').value.indexOf('stopPropagation') != -1) { event.stopPropagation(); }
if (document.getElementById('actionsel').value.indexOf('noonclick') == -1) {
if (numtype == '') { numtype='' + event.type + ':' + ('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] + ':' + ('' + othis.outerHTML).substring(1).split(' ')[0].split('>')[0]; } else { numtype+=',' + event.type + ':' + ('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] + ':' + ('' + othis.outerHTML).substring(1).split(' ')[0].split('>')[0]; }
console.log('numtype=' + numtype + ' ' + ('' + new Date()));
numtypes=numtype.split(',');
if (saveuntil == 2000) { setTimeout(assesslater, 100); }
//document.getElementById('myh1').innerHTML+=' ' + event.target.outerHTML.substring(1).split(' ')[0].split('>')[0];
if (('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] != 'button') {
if (eval('' + jdc) >= eval('' + lotsofsix.length)) { jdc=0; }
//alert('2967 ' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0]);
if ((',' + cindxs + ',').indexOf(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':') != -1) {
//alert((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0] + ' ' + jdc + ' ' + lotsofsix[jdc]);
jdc=Math.floor(Math.random() * lotsofsix.length);
thisalert('This ' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ' sestet snippet is ... ' + lotsofsix[jdc].split(';')[eval((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0])].replace(/\<br\>/g, String.fromCharCode(10)));
}
} else if (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'details' || (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'body' && blurbsuffix == '') || noway) {
//alert(1967);
noway=true;
if (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'body') { noway=false; }
} else {
//alert(blurbsuffix + ' ... ' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0]);
if (('' + othis.id) != '') { extras=' ID=' + othis.id; idfound=true; } else {
if (eval('' + jdc) >= eval('' + lotsofsix.length)) { jdc=0; }
if (eval('' + detnum) > 0) {
if (lotsofsix[jdc].split(';')[idc].indexOf('<br>') != -1) {
if (document.getElementById('det' + eval(-1 + detnum))) {
document.getElementById('det' + eval(-1 + detnum)).open=false;
}
}
}
blurb+='<br>' + lotsofsix[jdc].split(';')[idc].replace('<br>', '<br><details onclick="noway=false;" id=det' + detnum + ' open><summary>') + detsuffix; detsuffix='';
}
detsuffix='';
if (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'body' && !idfound) {
var suf=tableize(blurb.replace('</summary><br>', '</summary>') + blurbsuffix);
if (suf != '') { document.getElementById('results').innerHTML+=suf; }
//alert(document.getElementById('results').innerHTML);
detsuffix='';
blurbsuffix='';
detnum++;
} else if (idfound) {
detsuffix='';
blurbsuffix='';
document.getElementById('results').innerHTML+=othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + extras + ' clicked.<br>';
} else if (('' + event.target.outerHTML).substring(1).split(' ')[0].split('>')[0] != 'button') {
//alert(967);
if ((',' + cindxs + ',').indexOf(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':') != -1) {
jdc=Math.floor(Math.random() * lotsofsix.length);
thisalert('This ' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ' sestet snippet is ... ' + lotsofsix[jdc].split(';')[eval((',' + cindxs + ',').split(',' + othis.outerHTML.substring(1).split(' ')[0].split('>')[0] + ':')[1].split(',')[0])].replace(/\<br\>/g, String.fromCharCode(10)));
}
}
jdc++;
}
}
break;

default:
console.log('huh ' + event.type);
break;
}
}


</script>
</head>
<body onclick="moi(this);" oncontextmenu="moi(this);" ondblclick="moi(this);" onmouseover="moi(this);" onmouseout="moi(this);" onmousedown="moi(this);" ontouchdown="moi(this);" ontouchstart="moi(this);" ontouchend="moi(this);">

<h1 id=myh1>Sestet Examples <span id=numbers></span></h1>
<h3 id=myh3>RJM Programming - March, 2023</h3>
<h4 style='vertical-align:middle;'>Showing Onclick Event <br>Propagation in   <input onclick="event.stopPropagation(); if (document.getElementById('eventtype').value == 'contextmenu' && document.getElementById('actionsel').value == '' && this.checked) { document.getElementById('actionsel').value='preventDefault'; } else if (document.getElementById('eventtype').value != 'contextmenu' && document.getElementById('actionsel').value == 'preventDefault') { document.getElementById('actionsel').value=''; }" type=checkbox id=mycbomo style=display:inline-block;vertical-align:middle;></input> <select onclick="event.stopPropagation();" onchange="if (this.value == 'contextmenu' && document.getElementById('actionsel').value == '' && document.getElementById('mycbomo').checked) { document.getElementById('actionsel').value='preventDefault'; } else if (this.value != 'contextmenu' && document.getElementById('actionsel').value == 'preventDefault') { document.getElementById('actionsel').value=''; }" style=display:inline-block;vertical-align:middle; id=eventtype size=8><option value=mouseover>Onmouseover</option><option value=mousedown>Onmousedown</option><option value=mouseout>Onmouseout</option><option value=touchstart>Ontouchstart</option><option value=touchdown>Ontouchdown</option><option value=touchend>Ontouchend</option><option value=dblclick>Ondblclick</option><option value=contextmenu>Oncontextmenu</option></select> <select onclick="event.stopPropagation();" style=display:inline-block;vertical-align:middle; id=actionsel size=8><option value='' selected>Action</option><option value=preventDefault>Prevent Default Action</option><option value=stopPropagation>Stop Propagation Action</option><option value=preventDefaultstopPropagation>Prevent Default & Stop Propagation Action</option><option value='noonclick'>No Onclick Action</option><option value=preventDefaultnoonclick>Prevent Default No Onclick Action</option><option value=stopPropagationnoonclick>Stop Propagation No Onclick Action</option><option value=preventDefaultstopPropagationnoonclick>Prevent Default & Stop Propagation No Onclick Action</option></select> <span id=numberst></span></h4>
<h5 id=myh5>Thanks to <a target=_blank title='https://sites.google.com/site/examplesinpoetry/sestet-poetry-example-definition' href='https://sites.google.com/site/examplesinpoetry/sestet-poetry-example-definition'>Examples in Poetry</a> and <a target=_blank title='https://bilingualkidspot.com/2018/04/23/popular-nursery-rhymes-for-kids-english/' href='https://bilingualkidspot.com/2018/04/23/popular-nursery-rhymes-for-kids-english/'>Bilingual Kidspot</a> and Emily Dickinson and William Shakespeare</h5>

<table border=20 onclick="moi(this);" oncontextmenu="moi(this);" ondblclick="moi(this);" onmouseover="moi(this);" onmouseout="moi(this);" onmousedown="moi(this);" ontouchdown="moi(this);" ontouchstart="moi(this);" ontouchend="moi(this);">
<tbody onclick="moi(this);" oncontextmenu="moi(this);" ondblclick="moi(this);" onmouseover="moi(this);" onmouseout="moi(this);" onmousedown="moi(this);" ontouchdown="moi(this);" ontouchstart="moi(this);" ontouchend="moi(this);">
<tr onclick="moi(this);" oncontextmenu="moi(this);" ondblclick="moi(this);" onmouseover="moi(this);" onmouseout="moi(this);" onmousedown="moi(this);" ontouchdown="moi(this);" ontouchstart="moi(this);" ontouchend="moi(this);"><td onclick="moi(this);" oncontextmenu="moi(this);" ondblclick="moi(this);" onmouseover="moi(this);" onmouseout="moi(this);" onmousedown="moi(this);" ontouchdown="moi(this);" ontouchstart="moi(this);" ontouchend="moi(this);"><button onclick=" detsuffix='</summary>'; blurbsuffix='</details>'; idc=Math.floor(Math.random() * lotsofsix[0].split(';').length); jdc=0; blurb=''; idfound=false; moi(this);" title="Little Ditty">Sestet ...</button></td></tr>
</tbody>
</table>
<br><br>

<div id=results style='border: 5px dotted green;display:block;'>
</div>
</body>
</html>