Onclick Event Propagation Primer Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Onclick Event Propagation Primer Tutorial

Onclick Event Propagation Primer Tutorial

A basis for web application event driven programming strategies references โ€ฆ

  • element nesting and inheritance โ€ฆ
  • the default event propagation up through the element hierarchy

Of course you can ignore how this event โ€œbubblingโ€ can be harnessed, and indeed, we normally do not harness this event programming abilities in webpages, but not today! Today, we want to harness, via โ€œonclickโ€ event (sharing a common โ€ฆ



function moi(othis) {

var extras='';

if (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'details' || (othis.outerHTML.substring(1).split(' ')[0].split('>')[0] == 'body' && blurbsuffix == '') || noway) {

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>';

}

jdc++;

}

}

โ€ฆ event โ€œonclickโ€ logic Javascript function, as above) propagation, the sharing of piecing together the content display of โ€ฆ



Sestet poems and rhymes

โ€ฆ where the six lines of poetry are written out by the โ€œonclickโ€ events of โ€ฆ

  1. button
  2. td
  3. tr
  4. tbody
  5. table
  6. body

โ€ฆ in hierarchical order in the โ€œproof of conceptโ€ onclick_propagationโšซhtml Sestetโœ‚web application you can also try below โ€ฆ

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Tutorials and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *