Youโll have gleaned from yesterdayโs Mind Map and Flowchart and Venn Diagram Feedback Form Tutorial with respect to todayโs โproof of conceptโ ideas to allow for Feedback collaboration that can share one positional co-ordinate set โฆ
- given the Inline HTML Email Form being the communication conduit โฆ
- we are without access to Javascript so any onclick event logic is not available โฆ then โฆ
โif the mountain will not come to Muhammad, then Muhammad must go to the mountainโ
โฆ
- we harness the ideas presented in HTML Form Multiple Submit Buttons Primer Tutorial to glean (the optional) (left,top) co-ordinates of a click โฆ
- via the user clicking on a grid of input type=submit uniquely named (ie. grid_[left]_[top]) โฆ
- within an Inline HTML Email Form method=GET action=[backToOurHTML] โฆ
- that can pass on a mouse/touch click collaborator suggestion via an examination of document.URL as per โฆ
var suggestionxy='';
if (document.URL.indexOf('grid_') != -1) { suggestionxy='&suggestionxy=' + document.URL.split('grid_')[1].split('=')[0].split(encodeURIComponent('='))[0].replace('_',','); }
var vennis='', feedback='', recim='', emailcc='', emailto='', equ='=', xfeedback='';
if (document.URL.indexOf('feedback') != -1 && document.URL.indexOf('feedback=') == -1) { equ=encodeURIComponent('='); }
feedback=location.search.split('feedback' + equ)[1] ? decodeURIComponent((location.search).split('feedback' + equ)[1].split('&')[0].split('----')[0]).replace(/\+/g,' ') : '';
if (suggestionxy != '' && feedback == '') { feedback=' '; }
โฆ that โoptionalityโ assured because the previous input type=submit (as of yesterdayโs work) is still present should positional Feedback not be part of what the collaborator wants to communicate
That grid โproof of conceptโ weโd been referencing earlier on in this blog posting thread needs more explanation on top of the โฆ
While doing getBounding calculate grid min max whereby just before email formation add invisible grid of type=submit buttons later passed on visibly
โฆ email we sent ourselves as far as a plan goes here, especially as it was more to do with when the HTML div position:absolute elements get created that the one new โhardcoded HTMLโ (placed after other โhardcoded HTML div elementsโ) โฆ
<div id="grid"></div>
โฆ combines with the initialized (Javascript) โฆ
var gridminx=0, gridminy=0, gridmaxx=0, gridmaxy=0;
โฆ gets updated the most in function andthen โฆ
function andthen() {
var rightx=0, bottomy=0, topy=0;
// other code follows
if (h1is.indexOf('"myh1">Venn') != -1) { // Venn Diagram
topy=eval(syoff + yoff + y);
bottomy=topy;
bottomy+=eval(document.getElementById('idiam').style.width.replace('px',''));
rightx=eval(sxoff + xoff + x);
rightx+=eval(document.getElementById('idiam').style.width.replace('px',''));
if (rightx > gridmaxx) { gridmaxx=rightx; }
if (gridminy == 0 || topy < gridminy) { gridminy=topy; }
if (bottomy > gridmaxy) { gridmaxy=bottomy; }
// other Venn Diagram div placement code follows
} else {
topy=eval(syoff + yoff + y);
bottomy=topy;
bottomy+=100;
rightx=eval(sxoff + xoff + x);
rightx+=200;
if (rightx > gridmaxx) { gridmaxx=rightx; }
if (gridminy == 0 || topy < gridminy) { gridminy=topy; }
if (bottomy > gridmaxy) { gridmaxy=bottomy; }
// other non-Venn Diagram div placement code follows
}
// other code follows
}
โฆ though, yes, care is needed at the โdoing getBoundingโ โfunction makeroomโ bits as per โฆ
function makeroom(what) {
var ourrect=[], idivs;
var sbits=[];
var spref=document.getElementById('selroom').value;
if (what == 3) { // change body height
ourrect.push(document.body.getBoundingClientRect());
document.body.style.height='' + eval(eval(spref + '100') + ourrect[0].height) + 'px';
if (eval(eval(eval(spref + '100') + ourrect[0].height)) > gridmaxy) { gridmaxy=eval(eval(spref + '100') + ourrect[0].height); }
if (dystyle == '') {
dystyle=' style="height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px;"';
dystylecss=' body { height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px; } ';
} else if (dystyle.indexOf('height:') != -1) {
dystyle=dystyle.replace('height:' + dystyle.split('height:')[1].split(';')[0], 'height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px');
dystylecss=dystylecss.replace('height:' + dystylecss.split('height:')[1].split(';')[0], 'height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px');
} else {
dystyle=dystyle.replace(';"', ';height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px;"');
dystylecss=dystylecss.replace(';', '; height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px; ');
}
} else if (what == 2) { // change body width
ourrect.push(document.body.getBoundingClientRect());
document.body.style.width='' + eval(eval(spref + '100') + ourrect[0].width) + 'px';
if (eval(eval(eval(spref + '100') + ourrect[0].width)) > gridmaxx) { gridmaxx=eval(eval(spref + '100') + ourrect[0].width); }
if (dystyle == '') {
dystyle=' style="width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px;"';
dystylecss=' body { width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px; } ';
} else if (dystyle.indexOf('width:') != -1) {
dystyle=dystyle.replace('width:' + dystyle.split('width:')[1].split(';')[0], 'width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px');
dystylecss=dystylecss.replace('width:' + dystylecss.split('width:')[1].split(';')[0], 'width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px');
} else {
dystyle=dystyle.replace(';"', ';width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px;"');
dystylecss=dystylecss.replace(';', '; width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px; ');
}
} else {
// other code ... then ...
for (idivs=0; idivs<divs.length; idivs++) {
if (ourrect[idivs]) {
if (idivs == 0 && what == 1) { gridmaxy+=eval(spref + '100'); }
if (idivs == 0 && what == 0) { gridmaxx+=eval(spref + '100'); }
if (what == 1) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].id).indexOf('sp') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
divs[idivs].style.top='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.top).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(eval(spref + '100') + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(0 + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
} else if (what == 0) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].id).indexOf('sp') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
divs[idivs].style.left='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.left).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(0 + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(eval(spref + '100') + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
}
}
}
}
}
โฆ setting us up for just before the Feedback email is first sent we call into play โฆ
function gridize() {
document.getElementById('grid').innerHTML='';
for (var ix=gridminx; ix<eval(100 + gridmaxx); ix+=20) { //ix+=Math.floor(eval(eval(gridmaxx - gridminx) / 10))) {
for (var iy=eval(-100 + Math.floor(eval(gridminy / 20)) * 20); iy<eval(100 + gridmaxy); iy+=20) { //iy+=Math.floor(eval(eval(gridmaxy - eval(Math.floor(eval(gridminy / 10)) * 10)) / 10))) {
document.getElementById('grid').innerHTML+='<input style="visibility:hidden;z-index:99;background-color:transparent;width:1px;height:1px;position:absolute;left:' + ix + 'px;top:' + iy + 'px;" type=submit name=grid_' + ix + '_' + iy + ' value=x></input>';
}
}
}
โฆ as per โfunction ifemailโ intervention โฆ
function ifemail() {
var dogrid=false;
// more code asking for user interaction that could cause dogrid to become true until
if (dogrid) { gridize(); }
// other code
// Feedback email is sent ... via ...
document.getElementById('ifb' + jcnt).click();
// other code (includes code snippet below)
}
โฆ and be careful to immediately after this sending of Feedback email โฆ
if (dogrid) { document.getElementById('grid').innerHTML=''; }
And so todayโs progress leaves thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link there for you to again click a reworded โEmail/Feedbackโ button, to which you should supply an email address featuring both uppercase and lowercase letters to avail yourself of this new Feedback functionality we now have working for more than the IP address/web browser of the Feedback originator, and now possible to communicate one positional click/touch. Additionally, today, thechanged PHP flowchart
php helps the user not be restricted to the web browser of the Feedback originator, and with these positional Feedback ideas.
Previous relevant Mind Map and Flowchart and Venn Diagram Feedback Form Tutorial is shown below.
Yesterdayโs Mind Map and Flowchart and Venn Diagram Feedback Primer Tutorial and todayโs continued work plumb the restrictive depths of Inline HTML Email Forms, some issues you have to live with, against the big advantages of seeing webpage like content there and then as you open an email and the communication prompting sending an email involves, are โฆ
- ditch the thought that Javascript can help you, in any way shape or form
- ditch โbodyโ tag styling, though โstyleโ tag code within a โbodyโ section can work
- ditch โanimated emojisโ working (as it relies on Javascript) though emojis (composite or not) can work
- on some email clients (for example, Apple Mail yes, but Gmail webmail no) CSS position: absolute functions
- on some email clients (for example, Apple Mail yes, but Gmail webmail no) CSS border-radius functions
- on some email clients (for example, Apple Mail no, but Gmail webmail yes) spaces can be entered into input type=text and textarea of Inline HTML Email Forms โฆ so we offer the โ+โ character as a space alternative and the โ~โ as a Carriage Return alternative
- Gmail webmail โaโ tags seem to strip out the arguments of a URL involving โ&โ (ie. second argument and on) โฆ didnโt test elsewhere so resorted to a โformโ element to replace what we wanted the โaโ element to achieve โฆ but if you persist please note that encodeURIComponent(encodeURIComponent()) scenarios can occur
- Gmail webmail โformโ action attributes seem to strip out the arguments of a URL involving โ&โ (ie. second argument and on)
- Gmail webmail rejected our last attempts (but not on this project (though weโll try again tomorrow)) of including data-URI images
โฆ and we are sure there are many many more restrictions or partial restrictions, as well as what you might call โflakinessโ, which is the tabbing behaviour out of textboxes and textareas with regard to Inline HTML Email Forms.
Todayโs progress leaves thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link there for you to again click a reworded โEmail/Feedbackโ button, to which you should supply an email address featuring both uppercase and lowercase letters to avail yourself of this new Feedback functionality we now have working for more than the IP address/web browser of the Feedback originator. Additionally, today, thechanged PHP flowchart
php helps the user not be restricted to the web browser of the Feedback originator, and we feel some more changes coming on.
Previous relevant Mind Map and Flowchart and Venn Diagram Feedback Primer Tutorial is shown below.
On top of yesterdayโs Mind Map and Flowchart and Venn Diagram Make Room Tutorial weโve started down the road towards a โฆ
- feedback โฆ and โฆ
- sharing and collaboration
โฆ functionality to our โฆ
- Flowchart โฆ and โฆ
- Venn Diagram โฆ and โฆ
- Mind Map
โฆ โMathematical Graphics Tools Suiteโ web application weโre currently developing. It needs more refinement, and a โproof of conceptโ idea we didnโt get up to testing, so stay tuned.
The basic idea, though, is that the rjmprogramming.com.au domain mail server acts as the โhonest brokerโ between an โฆ
- originator of content (as above) as the initial emailer asking for Feedback or Collaboration โฆ and โฆ
- an emailee Collaborator
โฆ back to the โoriginator of contentโ via an Inline HTML Email Form.
That leaves thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link there for you to click a reworded โEmail/Feedbackโ button, to which you should supply an email address featuring both uppercase and lowercase letters to avail yourself of this new Feedback functionality we hope to improve over time.
Previous relevant Mind Map and Flowchart and Venn Diagram Make Room Tutorial is shown below.
We always find it happening to us, that being that we start graphically representing something, but find out that we need more room on the paper (or whatever) weโre using. That combined with our deep and abiding penchant to try to contain all the ideas on the one piece of paper, we find ourselves wishing we could โmake more roomโ, just like with those occasions Christmas wrapping you have cut out a piece of wrapping paper that ends up too small (and the olโ โdiagonal wrapping plan trickโ cannot help enough).
To the human eye, this is not a difficult conceptual job, but to the computer (with its programming โฆ andamended testehtm โฆ
โproof of conceptโ code) we need to consider (on top of our work up to Mind Map and Flowchart and Venn Diagram Tutorialโs) all of โฆ
- narrow the scope of relevant HTML elements that need to move to โฆ
- div
- position: absolute
- work out if they are โlink linesโ (via there ID attribute starting with โldโ, because of CSS โtransform rotateโ styling) or Flowchart (class diamond) question elements (because of using CSS ::after selectors)
- cater for 8 scenarios (attended to by one dropdown and four buttons โฆ
<table id=mytable style='display:inline-block;'><tr><td>Make <select ontouchdown='event.stopPropagation();' onmousedown='event.stopPropagation();' id='selroom'><option value=''>Room</option><option value='-'>Less Room</option></select> at the ...</td><td><input ontouchdown='event.stopPropagation(); makeroom(0);' onmousedown='event.stopPropagation(); makeroom(0);' type=button value='Left'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(1);' onmousedown='event.stopPropagation(); makeroom(1);' type=button value='Top'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(2);' onmousedown='event.stopPropagation(); makeroom(2);' type=button value='Right'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(3);' onmousedown='event.stopPropagation(); makeroom(3);' type=button value='Bottom'></input></td></tr></table>
) as per โฆ
function makeroom(what) {
var ourrect=[], idivs;
var sbits=[];
var spref=document.getElementById('selroom').value;
if (what == 3) {
ourrect.push(document.body.getBoundingClientRect());
document.body.style.height='' + eval(eval(spref + '100') + ourrect[0].height) + 'px';
} else if (what == 2) {
ourrect.push(document.body.getBoundingClientRect());
document.body.style.width='' + eval(eval(spref + '100') + ourrect[0].width) + 'px';
} else {
var divs=document.getElementsByTagName('div');
for (idivs=0; idivs<divs.length; idivs++) {
if (('' + divs[idivs].style.position).toLowerCase() == 'absolute') {
ourrect.push(divs[idivs].getBoundingClientRect());
} else {
ourrect.push(null);
}
}
for (idivs=0; idivs<divs.length; idivs++) {
if (ourrect[idivs]) {
if (what == 1) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
divs[idivs].style.top='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.top).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(eval(spref + '100') + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(0 + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
} else if (what == 0) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
divs[idivs].style.left='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.left).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(0 + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(eval(spref + '100') + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
}
}
}
}
}
โฆ where you can see โฆ - the โldโ div linking lines and class diamond Flowchart question elements needed to reference their own style โleftโ and โtopโ whereas all others could reference [divElement].getBoundingClientRect() rectangle โtopโ and โleftโ and โwidthโ and โheightโ properties โฆ being careful to โฆ
- pre-calculate all relevant [divElement].getBoundingClientRect() rectangle objects as a first pass before any moves, else any one move can affect moves further down the list (a trap this relatively young player fell for early on)
- lessened the โimpostโ of โanimated emojisโ (to be two and a half times slower than above as far as speed of animation goes)
Computer awkward, humans much better, giving you a feeling for some of the Artificial Intelligence spatial logic required for the least little movement โjobโ we humans take for granted, weโd say (eh wot guvโ!)
While we were at it, today, we also โฆ
- colour code menu webpage parts differently to the โgraphics palletteโ we encourage the user to use for clicks/touches
- fix a mobile issue regarding three touch linking line operations
- tweak the viewport to become
<meta name="viewport" content="width=device-width, initial-scale=0.5, minimum-scale=0.1, maximum-scale=10, user-scalable=yes" >
โฆ to make the menu text and buttons bigger at the start
Thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link is worth testing to see these ideas in action.
Previous relevant Mind Map and Flowchart and Venn Diagram Tutorial is shown below.
Is 3 a โฆ
- crowd โฆ or โฆ
- suite โฆ or โฆ
- sweet gathering?
Well, today, by adding โฆ
- Mind Map โฆ onto existant โฆ
- Flowchart โฆ and โฆ
- Venn Diagram
โฆ onto the (should we call it) โMathematical Graphics Tools Suiteโ or โBusiness Graphics Helper Outerers Suiteโ weโve opted for โsuiteโ following on from the work of Flowchart and Venn Diagram Mobile Tutorial โฆ sweet!
And today, for the first time we can remember, we have a new concept of โAnimated Emojisโ going on. Yes, weโve had โemoji overlaysโ when we presented Emoji Overlay Share Tutorial but they behaved like โstacked up onion layers that had to put up with their lotโ whereas โanimated emojisโ give two emojis the chance to โshineโ alternatively โtwinkle twinkle little star styleโ, and in between merge to try to describe a concept not currently dovetailing for any one emoji to be the consummate descriptor, by two (with a bit of imagination), courtesy of a small โproof of conceptโ testehtml โฆ
But, back to Mind Maps, thanks go to Venn vs Tree Diagrams: which to Use in Your Businessโs Mind-Mapping Helps Brainstorm Ideas chapter for crystallizing what role they can play โฆ
If you find that you donโt have a beginning and end point you can use to shape your flowchart, you might need a mindmap. Mindmaps help organize and keep track of thoughts. You organize maps into idea clusters, but everything centers around a main topic.
For example, if your business wants to develop a new feature or product, youโll need to figure out how youโre going to market it. A mindmap can help you organize all the different possible routes to take and exactly what each route will entail.
โฆ helping us shape a pared down tutorial picture start, then onto another new โusage conceptโ for the link lines of Mind Maps (or Flowcharts) โฆ
To create link lines click/touch two coloured elements and note that if on the way you make a stopover not on a coloured element the resultant link will go from the stopover to the second coloured element position.
โฆ allowing people who donโt like โdiagonal lineโ graphics to be โsquared offโ, as required โฆ to get to โฆ
โฆ from which the โaccountabilityโ comes with the โSaveโ button means by which we can save the graphics work to an image like โฆ
โฆ or be emailed off to an emailee with the โEmailโ button.
Feel free to try the new Mind Maps (and see the Animated Emojis (feeding time is strictly 3:00pm to 3:05pm AEST)) at thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link.
Previous relevant Flowchart and Venn Diagram Mobile Tutorial is shown below.
It was mainly mobile device usage of the web application of the recent Flowchart and Venn Diagram Loose Text Tutorial that led us to another phase of โrevisitingโ this web application. We found with โฆ
- the menu buttons were sometimes unclickable due to how it was positioned โฆ so โฆ
<h4 id='instruction' onclick='notc();'><div onclick='notc();' style='display:inline-block;' id=secpoint></div>Click where you want "<div onclick=" if (this.innerHTML.length == 0) { wording=cat; } bodyclick=false; nonbodyclick=-2; setTimeout(resetit,1000); " style='display:inline-block;background-color:pink;' id=dstart contenteditable=true onblur="wording=tfc(this.innerHTML); " title="What wording do you want? (~ is carriage return) ... optional (space to) URL will be a background image (append ' /browse' to browse for background image) ... later an #ffffff type of colour can change a background colour (should the colour picker not work)">Start</div>" to be placed<span id=myh4></span><div id="dsave" style="display:inline-block;"></div></h4>
<!--div id="dsave"></div--> - flowcharts on a mobile device would wrongly offset the linking lines โฆ so โฆ
var sxoff=0, syoff=0;
// later ...
document.getElementById('dcontent').innerHTML+='<span id=sp' + vscnt + ' style="z-index:56;position:absolute;top:' + eval(syoff + y) + 'px;left:' + eval(sxoff + x) + 'px;">' + vdtitle + wdef + '</span>';
// at onload ...
window.addEventListener('scroll', function(e){
sxoff=eval('' + window.pageXOffset);
syoff=eval('' + window.pageYOffset);
}); - both Venn Diagram and Flowchart use on mobile devices suffered from the lack of two finger gesture swipe and pinch possibilities โฆ so what used to be โontouchstartโ becomes โฆ
<body id=xbod style='width:100%; height: 100vh;' ontouchdown='recxy(event);' onmousedown='recxy(event);' onload='onl();'>
โฆ and when swipe and pinch feel like they should be a part of a web applicationโs mobile โworkingsโ you need a meta viewport tag as per (not the usual default incarnation) โฆ
<meta name="viewport" content="width=device-width, initial-scale=0.1, minimum-scale=0.1, maximum-scale=10, user-scalable=yes" >
So feel free to retry thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link, maybe on your mobile device.
Previous relevant Flowchart and Venn Diagram Loose Text Tutorial is shown below.
In constructing yesterdayโs Ajax Auto-completion Refinement Tutorialโs flowchart tutorial picture via Flowchart and Venn Diagram Glow Tutorialโs Flowchart and Venn Diagram web application, we found it had shortfalls performing the โYesโ and โNoโ (what we call loose) text annotations that help so much to make sense of the inherent logic of the Flowchart. This new โloose textโ consists of โฆ
- that same HTML div element type as for the rest of the work โฆ but โฆ
- drop the CSS styling (including โglowโ styling) โฆ and โฆ
- drop any padding that affects element positioning
โฆ so as to allow the โloose textโ be precisely (top left) positioned, as required. And while we are talking about positioning, we found with Venn Diagram positioning it was better to consider the userโs click as defining the centre of their circle rather than top left position so that when a second circle is added the user can get close enough (but not within) another circle to achieve the intersections pretty important to many Venn Diagram usefulness scenarios (unless you are modelling โsocial distancingโ, that is?!).
In broad brush terms, to make โloose textโ happen we โฆ
- introduce new Javascript global variables and new code โฆ
var loosetext=false;
var xoff=0, yoff=0;
var prevxoff=0, prevyoff=0;
function butlater() {
bodyclick=true;
xoff=prevxoff;
yoff=prevyoff;
}
function butlaterstill() {
loosetext=false;
} - introduce a new HTML input element โTextโ button as per the HTML (and inline Javascript) โฆ
<input style=background-color:lightgreen; id=itext type=button onclick="bodyclick=false; event.stopPropagation(); loosetext=true; prevxoff=xoff; prevyoff=yoff; xoff=0; yoff=0; setTimeout(butlater, 1500); " value=Text></input> - and then later if the user has clicked this โTextโ button and pressed in a position and entered their text into a Javascript prompt window (and into variable โwordingโ below) โฆ
if (loosetext) {
shape="";
setTimeout(butlaterstill, 1500); //loosetext=false;
}
โฆ happens ahead of Flowchart element Javascript creation โฆ
if (loosetext) {
document.getElementById('dcontent').innerHTML+="<div id=d" + icnt + " onclick='clickme(this);' style='" + biis + "line-height:20px;position:absolute;left:" + x + "px;top:" + y + "px;'>" + wording + "</div>";
}
โฆ or Venn Diagram element Javascript creation โฆ
if (loosetext) {
document.getElementById('dcontent').innerHTML+="<div id=d" + icnt + " onclick='recxy(event); clickme(this);' style='" + biis + "line-height:20px;position:absolute;left:" + x + "px;top:" + y + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'>" + wording + "</div>";
}
โฆ when the HTML div element innerHTML attribute starts to play its part
Feel free to retry thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link to try out the new โloose textโ possibilities.
Previous relevant Flowchart and Venn Diagram Glow Tutorial is shown below.
Here at RJM Programming, we are coming to realize that (W3Schoolโs glowing text inspired) โglowโ ideas can be that โextra dimensionโ to styling thoughts for so many of our web application efforts. Read more from yesterdayโs Horizontal Rule and Div Glowing Lines and Vertices Tutorial as the background to this, but todayโs โglowโ focus turns to โฆ
- Flowcharts and Venn Diagrams โฆ read background to this at Venn Diagrams Onclick Tutorial link โฆ with their โฆ
- div elements โฆ nothing new here, but today, there are special cases we need to cater for, those being the case of โฆ
- div style=โborder-radius:50%;โ โฆ and reading the super helpful link, thanks, we realized that box-shadow can (these days, for lots of platforms and browsers) simulate what border can do regarding โrounding its cornersโ (ie. the CSS border-radius property), got us to โฆ
<style>
.cglow {
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
-webkit-animation: cglow 1s ease-in-out infinite alternate;
-moz-animation: cglow 1s ease-in-out infinite alternate;
animation: cglow 1s ease-in-out infinite alternate;
-webkit-border-radius: 50%;
border-radius: 50%;
}
@-webkit-keyframes cglow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
}
to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
}
}
</style>
โฆ that combines with CSS โฆ
<style>
.circle {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
text-align: center;
width: 200px;
height: 200px;
border: none;
-webkit-border-radius: 50%;
border-radius: 50%;
font: normal 100%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
-o-text-overflow: clip;
text-overflow: clip;
background: pink; //#1abc9c;
opacity:0.5;
}
</style>
โฆ to help the Javascript be able to dynamically create โGlow Circlesโ for Venn Diagrams
โDynamicallyโ, in this case, is, for most intents and purposes, is like the user controllable mechanisms of yesterdayโs Horizontal Rule and Div Glowing Lines and Vertices Tutorial which weโll leave you to read way below, and show you the new version of โfunction glowit()โ just below, as per โฆ
function glowit() {
if (doglow) {
ciss=' class=glow';
xciss=' class=cglow';
document.getElementById('dstyle').innerHTML='<style> .circle { -webkit-animation: cglow 1s ease-in-out infinite alternate; -moz-animation: cglow 1s ease-in-out infinite alternate; animation: cglow 1s ease-in-out infinite alternate; } .oval, .rectangle, .glow { -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } </style>';
} else {
ciss='';
xciss='';
document.getElementById('dstyle').innerHTML='';
}
}
Feel free to try thechanged HTML and CSS and Javascript flowcharthtmlโs live
run link to try out the new โglowโ possibilities. And just remember โฆ
Glow with
the flow!
Previous relevant Horizontal Rule and Div Glowing Lines and Vertices Tutorial is shown below.
There is another graphical idea weโd like to add some (W3Schoolโs glowing text inspired) โglowโ to, like in the spirit of yesterdayโs Image Map with Overlay SVG Glowing Polygon Tutorial, but this time, we want it as a user controllable quality, as we realize sometimes people donโt want โglowโ in their faces (โฆ but then thereโs โฆ)
That (user controllable CSS via Javascript DOM into HTML div) concept involves โฆ
- hr (horizontal rule)
- div (that are CSS transformed) โฆ picking up where we left off with the web application sections of the HTML Square Horizontal Rule Image Map Notice Board Tutorial web application โฆ combined with โฆ
- static CSS animation keyframe arrangements involving box-shadow โฆ
/* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */
@-webkit-keyframes glow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
}
to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
}
}
โฆ that with the โglowโ work up to now has been combined with static CSS โcall that keyframes animationโ โฆ but not today โฆ where we add one more static HTML div at the end of the <body></body> section of the webpage as per โฆ
<div id=dstyle></div>
</body>
โฆ with our HTML and Javascript means by which โglow controlโ goes back to the user (optionally) via โฆ - dynamic CSS (because CSS is incredibly useful as a dynamically added โtoolโ statically before document.body onload within the <head></head> section or dynamically via Javascript DOM into the <body></body> section of the webpage โฆ
- within <head></head> webpage section we introduce a new global variable โฆ
var doglow=true; // default to "glow mode is yes" after 5 seconds showing non-glow mode implications - added to static text โ,โ of an H3 header element to change this way in HTML โฆ
<h3 id=myh3>RJM Programming - December<a class="glow" onclick="doglow=!doglow; if (!doglow) { this.className='xglow'; } else { this.className='glow'; } glowit(); " style="cursor:pointer;text-decoration:none;" title="Click to toggle glow mode">,</a> 2018<span id=debug></span></h3> - โฆ which starts as โglowingโ to attract the userโs attention to it, though the user has 5 seconds of time not to see this โglowโ applied to the application the user is accessing via document.body onload HTML โฆ
<body onload=' draw_hrs(); '> - โฆ that Javascript function โdraw_hrs()โ changing at its top to add in that 5 second delay (after document.body onload) logic โฆ
function draw_hrs() {
setTimeout(glowit, 5000);
// Rest of "draw_hrs" document.body onload logic follows ...
// ...
// End of rest of "draw_hrs" document.body onload logic
} - โฆ calling that Javascript function โglowit()โ which has the dual purpose of being whatโs called when the user takes control to click/touch the โ,โ to toggle โglow modeโ for the application section at hand โฆ
function glowit() {
if (doglow) {
document.getElementById('dstyle').innerHTML='<style> hr, .glow, div.vertical { -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } </style>';
} else {
document.getElementById('dstyle').innerHTML='';
}
}
- within <head></head> webpage section we introduce a new global variable โฆ
Thechanged square_hr_tracinghtm can
glow for you too.
Previous relevant Image Map with Overlay SVG Glowing Polygon Tutorial is shown below.
In the โglowingโ CSS styling work weโve been talking about recently, as with yesterdayโs Multiple Choice Quiz with Glowing Box Tutorial โGlowing Boxโ, today we have for you โฆ
- HTML image map element โฆ with โฆ
- area shape=โpolyโ (polygon) elements (that represent approximate coverage for Australian Indigenous Language areas in Australia) โฆ overlaid by โฆ
- SVG polygon elements (that come into play when an area element is clicked/touched โฆ all old news you can read from Australian Indigenous Language SVG Overlay Tutorial โฆ but new today we add โฆ
- โGlowing Polygonโ animated drop shadow (and thanks to this great link for help here) for that SVG polygon as per the new CSS styling โฆ
<style>
/* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */
svg {
font-size: 16px;
color: #fff;
text-align: center;
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
color: black;
-webkit-filter: drop-shadow(0 0 5px red);
filter: drop-shadow(0 0 5px red);
}
@-webkit-keyframes glow {
0% { -webkit-filter: drop-shadow(0 0 5px red); filter: drop-shadow(0 0 5px red); }
100% { -webkit-filter: drop-shadow(0 0 8px blue); filter: drop-shadow(0 0 8px blue); }
}
</style>
โฆ an effect quite eye-catching as you click/touch in a language region to find out more.
Perhaps you want to use this changedHTML and Javascript and CSS aboriginal_language_regionshtml image map live
run link to see how this plays out in actuality, or to explore a little into the oldest continuous culture on this planet?
Previous relevant Multiple Choice Quiz with Glowing Box Tutorial is shown below.
Weโre going from โGlowing Textโ ideas below, with HTML5 Mark Tag with Glowing Text Tutorial, to โGlowing Boxโ ideas, starting today, that we apply in the context of a Multiple Choice Quiz.
As far as online quizzes go, donโt know if you agree, but we think our best chance to remember our learning is, particularly regarding incorrect (quiz) answers, to either โฆ
- trap the user with a correct answer with a Javascript popup (eg. alert) window, awaiting the press of a button โฆ and/or โฆ
- really โin your faceโ highlighting of the correct answer (particularly in the case of a multiple choice scenario) with attention grabbing (CSS) styling
โฆ and so, for the latter, we queue the new โGlowing Boxโ (CSS) styling, which (to us) is the same as the (brilliant CSS W3schools glowing text idea) โGlowing Textโ styling except where you had โtext-shadowโ in the keyframes section (for โGlowing Textโ) we use โbox-shadowโ in that same keyframes section (for โGlowing Boxโ). We add this onto our previous efforts with HTML/Javascript Multiple Choice Quiz Reveal Tutorial.
With thechanged multiple_choice_quizhtml live
run link, you can try out the new CSS โGlowing Boxโ, as per โฆ
<style>
/* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */
.glow {
font-size: 16px;
color: #fff;
text-align: center;
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
color: black;
}
@-webkit-keyframes glow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
}
to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
}
}
</style>
โฆ overlaying correct Multiple Choice (set) answers with a very compelling (div โboxโ 3D looking) display.
Previous relevant HTML5 Mark Tag with Glowing Text Tutorial is shown below.
To get the background to our attention seeking โmarkโ tag โglowing textโ application please read โฆ
- HTML5 Mark Tag Div Contenteditable Tutorial โฆ along with โฆ
- Glowing Text Validation Primer Tutorialโs thread of blog postings below inspired by the CSS brilliance of W3Schoolโs glowing text idea
โฆ todayโs use quite apt for this โmarkโ tagโs text highlighting talent. Itโs default highlighting is a strong yellow background colour, but you can apply this โglowing textโ CSS class to achieve a more โin your face resultโ, which you can try (thechanged markithtmlโs) live
run link โฆ or below โฆ
โฆ yourself, to see what the effect is of โmark highlightingโ and โglowing textโ.
Previous relevant Glowing Text Validation Primer Tutorial is shown below.
Yesterdayโs application of the use of CSS brilliance of W3Schoolโs glowing text idea with Shooting Star Game Primer Tutorial was just one idea regarding the use of glowing text. What about using it with form validation?
Yes, thatโs โa goerโ โฆ see, even the pamplettes are nodding. The reason, of course, is that glowing text is a mechanism whereby you can grab the attention of even the most blasรฉ of online users. And especially if the field you are โform validatingโ is mission critical, this could be a good ploy.
See how we apply this (by making mistakes filling in the forms) with โฆ
- thechanged html5_form_constraint_validation
htmlโs live
run as featured on HTML5 Form API Validation Revisit Tutorial
- thechanged oninvalid
html live
run as featured on HTML Oninvalid Event Form Validation Primer Tutorial
Previous relevant Shooting Star Game Primer Tutorial is shown below.
Weโve got one of those pretty simple โclick โem upโ games for you today, inspired by the CSS brilliance of W3Schoolโs glowing text idea, thanks.
That set us to thinking of Emojis we could apply (in front of the great background ideas derived from this advice) and looked up Emojipedia (is good for looking up Emoji names or concepts in words) and onto FileFormat Information (is great for HTML Entity determinations for your less complex Emojis) and even Iemoji (is great for HTML Entity determinations for Emojis of all complexities) to determine some components to our game, those being โฆ
โฆ star
โฆ comet
โฆ moon
โฆ which, in turn, led to thoughts regarding a game โฆ
- for one player
- that rewards fast reflexes โฆ and โฆ
- scores via onclick event logic on each component
- according to levels of difficulty โฆ and โฆ
- lessens the score for โblazing awayโ clicks (or touches) โฆ for that, if a player score is (made up of) score/goes then โgoesโ is incremented by any document.body onclick event during the game
Levels of difficulty โฆ pour quoi? Well, we can change the โฆ
- Emoji font-size โฆ and/or โฆ
- Movement potential of emoji (in pixels) in any โsetTimeout(movecomponents, 100);โ 1/10th of a second call cycle
Have a go of todayโs shooting_star_gamehtml game if you like, to see this in action.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.