{"id":21184,"date":"2016-04-11T03:01:27","date_gmt":"2016-04-10T17:01:27","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=21184"},"modified":"2016-06-03T10:08:42","modified_gmt":"2016-06-03T00:08:42","slug":"feedback-email-attachment-iframe-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/feedback-email-attachment-iframe-tutorial\/","title":{"rendered":"Feedback Email Attachment Iframe Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Feedback Email Attachment Iframe Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback_iframe.jpg\" title=\"Feedback Email Attachment Iframe Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Feedback Email Attachment Iframe Tutorial<\/p><\/div>\n<p>We&#8217;re continuing on with our Feedback project for the RJM Programming website today, incorporating the recent Annotation and Email Attachment functionality we last talked about with <a target=_blank title='Canvas Annotation Email Attachment Rotation Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/canvas-annotation-email-attachment-rotation-tutorial\/'>Canvas Annotation Email Attachment Rotation Tutorial<\/a>.  We build on yesterday&#8217;s <a title='Feedback Email Attachment Primer Tutorial' href='#feapt'>Feedback Email Attachment Primer Tutorial<\/a> as shown below, to add &#8230;<\/p>\n<ol>\n<li>a dropdown list of RJM Programming Blog Posting Titles to &#8220;start the ball rolling&#8221; regarding a possible feedback topic for the user<\/li>\n<li>improvements to styling and practicalities such as supplying default From field to encourage that field&#8217;s use by the user<\/li>\n<\/ol>\n<p>We use what we like to term as &#8220;Client Pre-emptive Iframe&#8221; methods to satisfy idea 1 above and maybe you would like to read <a target=_blank title='Client Pre-emptive Iframe Crontab Curl Rotated Report Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/client-pre-emptive-iframe-crontab-curl-rotated-report-tutorial\/'>Client Pre-emptive Iframe Crontab Curl Rotated Report Tutorial<\/a> (all the way through) for a more thorough discussion, but for now, consider the idea as Javascript client work feeling a bit like PHP server work, by using the <a target=_blank title='Events information from w3schools' href='http:\/\/www.w3schools.com\/tags\/ref_eventattributes.asp'><i>onload<\/i><\/a> event of an HTML <a target=_blank title='HTML iframe element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> element (probably using a <i>src=<\/i> parameter from the same domain your HTML sits on) to (what feels like internally datascraping) the iframe&#8217;s <i>document.body.innerHTML<\/i> and extract something of interest to load into a local HTML element, quite often that being an HTML div element.  We do that to take that dropdown of the RJM Programming landing page relating to the latest RJM Programming blog postings and &#8220;slap&#8221; this into the local HTML div element, and rewrite the logic of its <i>onchange<\/i> event logic to do what we want to do here, rather than what the RJM Programming landing page wants to do.  In doing this, our Javascript client is actually &#8220;channelling&#8221; PHP behind the scenes, else how else could we glean that information from a WordPress MySql database (pray tell &#8230; <font size=1>have been longing for a chance to use that phrase<\/font>)?  Read that previous link&#8217;s blog posting, and perhaps more off it to get the whole story of how HTML can be the &#8220;conduit&#8221; of doing server side feeling things via the use of the dynamic duo &#8230; Crontab (of Linux or Unix) and Curl (of lots of platforms).<\/p>\n<p>This is &#8220;Client Pre-emptive Iframe&#8221; where we know the <i>src=<\/i> of the HTML iframe in a &#8220;static&#8221; way, but we believe here that some web applications can be designed where <i>src=<\/i> can be in the form of a sequence that doesn&#8217;t always exist, but your code can check for this, and not fall over, and continue being that little bit &#8220;server&#8221; like without being &#8220;server&#8221; like &#8230; <a target=_blank title='Claytons' href='https:\/\/www.youtube.com\/watch?v=ylH43Tcaj60'><i>&#8220;Clayton&#8217;s&#8221;<\/i><\/a> anyone?!<\/p>\n<p>So, again, please see &#8230;<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html-GETME\" title='feedback.html'>feedback.html<\/a> HTML and Javascript  changed from last time in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html-GETME\" title='feedback.html'>this way<\/a>, with this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html\" title='Click picture'>live run<\/a> &#8230; that supervises the emailing &#8230;<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/world.php---GETME\" title='world.php'>world.php<\/a> as the unchanged PHP emailer of email attachment  &#8230; and &#8230;<\/li>\n<li><a target=_blank title='world.js' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/world.js------GETME' title='world.js'>world.js<\/a> as the unchanged supervised external Javascript<\/li>\n<\/ul>\n<p>We hope you give the Feedback web application a go.<\/p>\n<hr>\n<p id='feapt'>Previous relevant <a target=_blank title='Feedback Email Attachment Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/feedback-email-attachment-primer-tutorial\/'>Feedback Email Attachment Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"Feedback Email Attachment Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.jpg\" title=\"Feedback Email Attachment Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Feedback Email Attachment Primer Tutorial<\/p><\/div>\n<p>We&#8217;re starting out on a Feedback project for the RJM Programming website today, incorporating the recent Annotation and Email Attachment functionality we last talked about with <a target=_blank title='Canvas Annotation Email Attachment Rotation Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/canvas-annotation-email-attachment-rotation-tutorial\/'>Canvas Annotation Email Attachment Rotation Tutorial<\/a>.<\/p>\n<p>Being as we use email, we want to be able to do a few things that make it worthwhile to do, rather than just use an email client.  The scribble functionality and image placement functionality fits this &#8220;bill&#8221;, otherwise why &#8220;reinvent wheels&#8221;.  But we are in the early days here, and we&#8217;ll be revisiting this theme and then we proceed to non-Primer tutorials on the topic, and, as always, we&#8217;d welcome any of your feedback, as users.<\/p>\n<p>Feedback and polling have that similarity of encouraging user input, short of allowing blog users to post their own blogs, a stage we have not allowed here at this blog, as the moderation of image data is a step too far for us to maintain.  But please know we&#8217;ll review any of your feedback and respond accordingly.  To reply to your feedback we&#8217;d need the From field be filled out with a legitimate email address, something also required bt many email clients to better determine an email is not spam.<\/p>\n<p>So please see &#8230;<\/p>\n<ul>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html_GETME\" title='feedback.html'>feedback.html<\/a> HTML and Javascript new to our project today, with this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/feedback.html\" title='Click picture'>live run<\/a> &#8230; that supervises the emailing &#8230;<\/li>\n<li><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/world.php--GETME\" title='world.php'>world.php<\/a> PHP emailer of email attachment changed from last time in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/world.php--GETME\" title='world.php'>this way<\/a> &#8230; and &#8230;<\/li>\n<li><a target=_blank title='world.js' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/world.js------GETME' title='world.js'>world.js<\/a> as the unchanged supervised external Javascript<\/li>\n<\/ul>\n<p>As we say, we will return, and hope this gives you more food for thought with your own endeavours.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d21160' onclick='var dv=document.getElementById(\"d21160\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/attachment\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d21160' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d21184' onclick='var dv=document.getElementById(\"d21184\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/iframe\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d21184' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re continuing on with our Feedback project for the RJM Programming website today, incorporating the recent Annotation and Email Attachment functionality we last talked about with Canvas Annotation Email Attachment Rotation Tutorial. We build on yesterday&#8217;s Feedback Email Attachment Primer &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/feedback-email-attachment-iframe-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1848,12,14,37],"tags":[1832,103,111,184,1849,297,380,409,1847,1840,576,578,590,745,812,894,932,997,1843,1072,1841,1319,1842],"class_list":["post-21184","post","type-post","status-publish","format-standard","hentry","category-software-coding","category-elearning","category-event-driven-programming","category-tutorials","tag-annotation","tag-array","tag-attachment","tag-canvas","tag-coding","tag-data-url","tag-email","tag-external-javascript","tag-feedback","tag-filereader","tag-html","tag-html5","tag-image","tag-map","tag-mouse","tag-overlay","tag-php","tag-programming","tag-redo","tag-rotation","tag-scribble","tag-tutorial","tag-undo"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/21184"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=21184"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/21184\/revisions"}],"predecessor-version":[{"id":22474,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/21184\/revisions\/22474"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=21184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=21184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=21184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}