{"id":7092,"date":"2014-04-05T05:08:15","date_gmt":"2014-04-04T18:08:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7092"},"modified":"2016-02-08T17:09:15","modified_gmt":"2016-02-08T07:09:15","slug":"javascript-in-your-wordpress-post-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-in-your-wordpress-post-primer-tutorial\/","title":{"rendered":"Javascript in Your WordPress Post Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Wordpress\/Post\/Javascript_Wordpress_Post.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Javascript in Your WordPress Post Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Javascript\/Wordpress\/Post\/Javascript_Wordpress_Post.jpg\" title=\"Javascript in Your WordPress Post Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Javascript in Your WordPress Post Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s tutorial is ideally (designed) for the writers of blog posts who administer their blog&#8217;s content, and augments the content of <a href='#njwapt' title='NetBeans Java Web Application Primer Tutorial'>NetBeans Java Web Application Primer Tutorial<\/a> as shown below, to illustrate that within your WordPress (Blog) Posting you can include (dynamic) Javascript functionality.    Today we do this with a WordPress (Blog) Posting that allows you to play a game of Noughts and Crosses (maybe you say Tic-Tac-Toe?!).<\/p>\n<p>The advice I&#8217;d give about this (and could well apply to other <a target=_blank title='MAMP' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=CMS'>CMS<\/a> products other than <a target=_blank title='MAMP' href='http:\/\/www.wordpress.com'>WordPress<\/a>) is listed below in point form (the one in bold itallics is the &#8220;get to the point&#8221; point):<\/p>\n<ul>\n<li>If you are using a <a target=_blank title='WYSIWYG' href='http:\/\/en.wikipedia.org\/wiki\/Wysiwyg'>WYSIWYG<\/a> (blog) post editor make sure you choose the HTML content option, to do with what follows.<\/li>\n<li><b><i>In your embedded Javascript make sure there is no white space between your &lt;script type=&#8221;text\/javascript&#8221;&gt; and what follows, and between your ending &lt;\/script&gt; and what follows, then place all this (Javascript) into the correct <a href='#ttth1' title='Tic-Tac-Toe'>position<\/a> of your (blog) posting HTML.<\/i><\/b><\/li>\n<li>Test that this does not interfere with other functionality &#8230; reason for &#8220;is really for the writers of blog posts who administer their blog&#8217;s content&#8221; above.<\/li>\n<li>A good way to &#8220;test&#8221; (as in point above) is to unit test your Javascript on a local webserver (like <a target=_blank title='MAMP' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=MAMP'>MAMP<\/a> on a Mac or <a target=_blank title='MAMP' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=EasyPHP'>EasyPHP<\/a> on Windows etcetera etcetera etcetera), and then separately test it integrated in with your actual (blog) website as a separate test before publishing.<\/li>\n<li>You can get the gist of the nitty-gritty of today&#8217;s tutorial by looking at your View Page Source option on this browser session &#8230; Javascript of the (blog) posting starts at &lt;script type=&#8221;text\/javascript&#8221;&gt;var cgoes=&#8221;&#8221;;<\/li>\n<li>You may ask, why are we talking about this?   One reason is that lots of people would not want to touch, or are not permitted to touch (though that would be a bit weird for my (default) target audience?!), their (WordPress) theme code, and this method circumvents having to, but pretty obviously, won&#8217;t make you that cup of coffee before you even knew you wanted one, first thing (however, if I am wrong, can we do an app together?!).<\/li>\n<li>Conversely, as a (blog) post administrator, you can see that perhaps if you have guest (blog) posting functionality maybe you should (within the WYSIWYG preferences)  turn off the possibility of the use of &lt;script&gt; and &lt;\/script&gt; tags (ie. embedded Javascript).<\/li>\n<\/ul>\n<table align=\"center\" style=\"color: red; border: 0;\">\n<tr>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<\/tr>\n<tr>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<\/tr>\n<tr>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<td style=\"font-color: red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;V&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/td>\n<\/tr>\n<\/table>\n<p><script type=\"text\/javascript\">var cgoes=\"\";\nvar v11=0;\nvar v12=0;\nvar v13=0;\nvar v21=0;\nvar v22=0;\nvar v23=0;\nvar v31=0;\nvar v32=0;\nvar v33=0;\nvar cscore=0;\nvar dscore=0;\nvar yscore=0;<\/p>\n<p>function newgame() {\n cgoes=\"\";\n v11=0;\n v12=0;\n v13=0;\n v21=0;\n v22=0;\n v23=0;\n v31=0;\n v32=0;\n v33=0;\n var huh;\n huh = document.getElementById(\"11\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"12\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"13\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"21\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"22\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"23\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"31\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"32\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n huh = document.getElementById(\"33\");\n huh.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\";\n}<\/p>\n<p>function doit(imgo) {\n  var wi = 0;\n  var nxt;\n  var suffix = imgo.id;\n  if (cgoes.indexOf(\";\" + suffix + \";\") != -1) {\n   alert(\"Huh?\");\n  } else {\n  imgo.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttcross.png\";\n  cgoes = cgoes + \";\" + suffix + \";\";\nswitch(suffix)\n{\ncase '11':\n  v11 = 1;\n  if (eval(v11 + v12 + v13) == 3 || eval(v11 + v21 + v31) == 3 || eval(v11 + v22 + v33) == 3) wi = 1;\n  break;\ncase '12':\n  v12 = 1;\n  if (eval(v11 + v12 + v13) == 3 || eval(v12 + v22 + v32) == 3) wi = 1;\n  break;\ncase '13':\n  v13 = 1;\n  if (eval(v11 + v12 + v13) == 3 || eval(v13 + v23 + v33) == 3 || eval(v13 + v22 + v31) == 3) wi = 1;\n  break;\ncase '21':\n  v21 = 1;\n  if (eval(v21 + v22 + v23) == 3 || eval(v11 + v21 + v31) == 3) wi = 1;\n  break;\ncase '22':\n  v22 = 1;\n  if (eval(v21 + v22 + v23) == 3 || eval(v12 + v22 + v32) == 3 || eval(v11 + v22 + v33) == 3 || eval(v13 + v22 + v31) == 3) wi = 1;\n  break;\ncase '23':\n  v23 = 1;\n  if (eval(v21 + v22 + v23) == 3 || eval(v13 + v23 + v33) == 3) wi = 1;\n  break;\ncase '31':\n  v31 = 1;\n  if (eval(v31 + v32 + v33) == 3 || eval(v13 + v22 + v31) == 3 || eval(v11 + v21 + v31) == 3) wi = 1;\n  break;\ncase '32':\n  v32 = 1;\n  if (eval(v31 + v32 + v33) == 3 || eval(v12 + v22 + v32) == 3) wi = 1;\n  break;\ncase '33':\n  v33 = 1;\n  if (eval(v31 + v32 + v33) == 3 || eval(v13 + v23 + v33) == 3 || eval(v11 + v22 + v33) == 3) wi = 1;\n  break;<\/p>\n<p>default:\n  break;\n}<\/p>\n<p>if (wi == 1) {\n   yscore = yscore + 1;\n   alert(\"Congratulations!   You win.  Scores: Computer \" + cscore + \" vs You \" + yscore + \" (\" + dscore + \" draws)\");\n   newgame();<\/p>\n<p>} else if (wi == 0) {\n if (v22 == 0 && (eval(v21 + v22 + v23) == -2 || eval(v12 + v22 + v32) == -2 || eval(v11 + v22 + v33) == -2 || eval(v13 + v22 + v31) == -2)) {\n   v22 = -1;\n   wi = -1;\n   nxt = document.getElementById('22');\n } else if (v11 == 0 && (eval(v11 + v12 + v13) == -2 || eval(v11 + v21 + v31) == -2 || eval(v11 + v22 + v33) == -2)) {\n   v11 = -1;\n   wi = -1;\n   nxt = document.getElementById('11');\n } else if (v13 == 0 && (eval(v11 + v12 + v13) == -2 || eval(v13 + v23 + v33) == -2 || eval(v13 + v22 + v31) == -2)) {\n   v13 = -1;\n   wi = -1;\n   nxt = document.getElementById('13');\n } else if (v31 == 0 && (eval(v31 + v32 + v33) == -2 || eval(v13 + v22 + v31) == -2 || eval(v11 + v21 + v31) == -2)) {\n   v31 = -1;\n   wi = -1;\n   nxt = document.getElementById('31');\n } else if (v33 == 0 && (eval(v31 + v32 + v33) == -2 || eval(v13 + v23 + v33) == -2 || eval(v11 + v22 + v33) == -2)) {\n   v33 = -1;\n   wi = -1;\n   nxt = document.getElementById('33');<\/p>\n<p> } else if (v12 == 0 && (eval(v11 + v12 + v13) == -2 || eval(v12 + v22 + v32) == -2)) {\n   v12 = -1;\n   wi = -1;\n   nxt = document.getElementById('12');\n } else if (v21 == 0 && (eval(v21 + v22 + v23) == -2 || eval(v11 + v21 + v31) == -2)) {\n   v21 = -1;\n   wi = -1;\n   nxt = document.getElementById('21');\n } else if (v23 == 0 && (eval(v21 + v22 + v23) == -2 || eval(v13 + v23 + v33) == -2)) {\n   v23 = -1;\n   wi = -1;\n   nxt = document.getElementById('23');\n } else if (v32 == 0 && (eval(v31 + v32 + v33) == -2 || eval(v12 + v22 + v32) == -2)) {\n   v32 = -1;\n   wi = -1;\n   nxt = document.getElementById('32');\n }\n if (wi != 0) {\n   nxt.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttcircle.png\";\n   cgoes = cgoes + \";\" + nxt.id + \";\";\n   cscore = cscore + 1;\n   alert(\"Computer wins!   Bad luck.  Scores: Computer \" + cscore + \" vs You \" + yscore + \" (\" + dscore + \" draws)\");\n   newgame();\n }\n if (wi == 0) {\n    if (v22 == 0 && (eval(v21 + v22 + v23) == 2 || eval(v12 + v22 + v32) == 2 || eval(v11 + v22 + v33) == 2 || eval(v13 + v22 + v31) == 2)) {\n   v22 = -1;\n   nxt = document.getElementById('22');\n } else if (v11 == 0 && (eval(v11 + v12 + v13) == 2 || eval(v11 + v21 + v31) == 2 || eval(v11 + v22 + v33) == 2)) {\n   v11 = -1;\n   nxt = document.getElementById('11');\n } else if (v13 == 0 && (eval(v11 + v12 + v13) == 2 || eval(v13 + v23 + v33) == 2 || eval(v13 + v22 + v31) == 2)) {\n   v13 = -1;\n   nxt = document.getElementById('13');\n } else if (v31 == 0 && (eval(v31 + v32 + v33) == 2 || eval(v13 + v22 + v31) == 2 || eval(v11 + v21 + v31) == 2)) {\n   v31 = -1;\n   nxt = document.getElementById('31');\n } else if (v33 == 0 && (eval(v31 + v32 + v33) == 2 || eval(v13 + v23 + v33) == 2 || eval(v11 + v22 + v33) == 2)) {\n   v33 = -1;\n   nxt = document.getElementById('33');<\/p>\n<p> } else if (v12 == 0 && (eval(v11 + v12 + v13) == 2 || eval(v12 + v22 + v32) == 2)) {\n   v12 = -1;\n   nxt = document.getElementById('12');\n } else if (v21 == 0 && (eval(v21 + v22 + v23) == 2 || eval(v11 + v21 + v31) == 2)) {\n   v21 = -1;\n   nxt = document.getElementById('21');\n } else if (v23 == 0 && (eval(v21 + v22 + v23) == 2 || eval(v13 + v23 + v33) == 2)) {\n   v23 = -1;\n   nxt = document.getElementById('23');\n } else if (v32 == 0 && (eval(v31 + v32 + v33) == 2 || eval(v12 + v22 + v32) == 2)) {\n   v32 = -1;\n   nxt = document.getElementById('32');\n } else if (v22 == 0) {\n     v22 = -1;\n   nxt = document.getElementById('22');\n   } else if (v11 == 0) {\n     v11 = -1;\n   nxt = document.getElementById('11');\n   } else if (v13 == 0) {\n     v13 = -1;\n   nxt = document.getElementById('13');\n   } else if (v31 == 0) {\n     v31 = -1;\n   nxt = document.getElementById('31');\n   } else if (v33 == 0) {\n     v33 = -1;\n   nxt = document.getElementById('33');\n   } else if (v12 == 0) {\n     v12 = -1;\n   nxt = document.getElementById('12');\n   } else if (v21 == 0) {\n     v21 = -1;\n   nxt = document.getElementById('21');\n   } else if (v23 == 0) {\n     v23 = -1;\n   nxt = document.getElementById('23');\n   } else if (v32 == 0) {\n     v32 = -1;\n   nxt = document.getElementById('32');\n   } else {\n   dscore = dscore + 1;\n   alert(\"It is a draw.   Well played.  Scores: Computer \" + cscore + \" vs You \" + yscore + \" (\" + dscore + \" draws)\");\n   newgame();\n   }\n   nxt.src = \"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttcircle.png\";\n   cgoes = cgoes + \";\" + nxt.id + \";\";\n }\n}\n}\n}<\/p>\n<p><\/script><\/p>\n<h1 id='ttth1'>You say Tic Tac Toe &#8230; I say Noughts and Crosses<\/h1>\n<table title='Click a box to make your move in Noughts and Crosses game against Computer' ondblclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Games\/Noughtsandcrosses\/\",\"_blank\");'>\n<tbody style=\"background-color:pink;\">\n<tr>\n<td style=\"border-right: 2px solid red;border-bottom: 2px solid red;\" id=\"t11\"><img decoding=\"async\" id=\"11\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-bottom: 2px solid red;\" id=\"t12\"><img decoding=\"async\" id=\"12\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-bottom: 2px solid red;\" id=\"t13\"><img decoding=\"async\" id=\"13\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;\" id=\"t21\"><img decoding=\"async\" id=\"21\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td id=\"t22\"><img decoding=\"async\" id=\"22\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;\" id=\"t23\"><img decoding=\"async\" id=\"23\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;border-top: 2px solid red;\" id=\"t31\"><img decoding=\"async\" id=\"31\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-top: 2px solid red;\" id=\"t32\"><img decoding=\"async\" id=\"32\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-top: 2px solid red;\" id=\"t33\"><img decoding=\"async\" id=\"33\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"#post-454\" title=\"Coward's way out?\" onclick=\"newgame();\">New game<\/a><\/p>\n<hr \/>\n<p id='njwapt'>Previous <a href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=4622' title='NetBeans Java Web Application Primer Tutorial'>NetBeans Java Web Application Primer Tutorial<\/a> is relevant and shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"NetBeans Java Web Application Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-14of.jpg\" title=\"NetBeans Java Web Application Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">NetBeans Java Web Application Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s NetBeans Java Web Application primer tutorial builds on our previous <a target=_blank title='Tic Tac Toe' href='#tttoe'>Tic Tac Toe<\/a> game shown below.   We need to revisit this area of NetBeans to examine web <a target=_blank title='Java Servlet' href='http:\/\/en.wikipedia.org\/wiki\/Web_container\u200e'>Java Servlets<\/a>, at a later date, because this Tic Tac Toe Java Web Application only goes so far as to use a <a target=_blank title='jsp file information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/JavaServer_Pages\u200e'>JavaServer Page<\/a> using JavaScript but <a target=_blank title='Ajax' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Ajax'>Ajax<\/a>, for instance, can be part of such functionality.  In saying that, take a look at the last two slides of the tutorial to see that you can mix <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-22of.jpg\">Java<\/a> with HTML when you use <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/NetBeans_JavaWebApplication_Primer-23of.jpg\">JSP functionality<\/a>.<\/p>\n<p>Programming <a target=_blank title='IDE information from Wikipedia' href='http:\/\/een.wikipedia.org\/wiki\/IDE\u200e'>IDE<\/a>s take a lot of the hard work out of tasks such as compiling and linking in languages such as Java, C, C++, VB.Net and C#.   In the case of NetBeans IDE, which this blog reintroduces to you today (its customary to shake hands, and no <a target=_blank title='pardon?' href='http:\/\/www.youtube.com\/watch?v=SGZV6fsotYo'>Klingon<\/a> is necessary), it can create a Java Web Application, for instance, as we do today to create a Tic Tac Toe game as a web application.   To cut a long story short, there aint nothin&#8217; wrong with a good ol&#8217; IDE, but beware of IDEs in <a target=_blank title='Ides of March' href='https:\/\/www.youtube.com\/watch?v=Je0gTnheVe4'>March<\/a>.<\/p>\n<p>In saying that about IDEs, and how they make programming easier, often with Open Source programming, it is advantageous to know what goes on &#8220;under the hood&#8221; (or even &#8220;in the &#8216;hood&#8221; &#8230; chortle, chortle).   So if you ever get an opportunity to get helped creating your own makefile (or make it yourself, even with the <a target=_blank title='Sweet Green Icing' href='http:\/\/www.youtube.com\/watch?v=CPMpeNDIGdk'>Sweet Green Icing<\/a> &#8230; knew it could be worked in!) for something, take the opportunity to learn how to do this, as the Open Source world will become a little easier to navigate with such types of knowledge.   You&#8217;ve got to admire those early designers of computer languages, and those days when all you had was this tiny bit of memory (<a target=_blank title='64k' href='http:\/\/www.crashonline.org.uk\/39\/z88.htm'>64k<\/a> or <a target=_blank title='Voyager computer system' href='http:\/\/www.activeastronomy.org\/Home\/daniel'>&#8220;into the heliosphere on 8,000 bytes of memory&#8221;<\/a>) to play with to create your program.   <\/p>\n<p>In doing this NetBeans Java Web Application found that Java JDK 1.6 needed to be upgraded to Java JDK 1.7 to allow for the workings of the <a target=_blank title='GlassFish Web Server information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/GlassFish\u200e'>GlassFish Web Server<\/a> used by NetBeans, and, in order to do this, found <a target=_blank title='JDK 1.7 upgrade information' href='http:\/\/stackoverflow.com\/questions\/17376543\/how-to-upgrade-jdk-1-6-to-a-higher-version-to-run-glassfish'><i>How to upgrade JDK 1.6 to a higher version to run Glassfish?<\/i><\/a> was incredibly helpful pointing to <a target=_blank title='Java SE Downloads page' href='http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk7-downloads-1880260.html'><i>Java SE Downloads<\/i><\/a> as the useful download area of interest.<\/p>\n<p>NetBeans can be an IDE for much more than Java &#8230; it can supervise PHP, C++, Maven, Groovy and HTML\/Javascript.   In coming days and weeks we&#8217;ll look at more.<\/p>\n<p>Link to downloadable NetBeans Java Web Application <a target=_blank title='jsp file information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/JavaServer_Pages\u200e'>JavaServer Page<\/a> programming source code at <a target=_blank title='index.jsp' href='http:\/\/www.rjmprogramming.com.au\/NetBeans\/Java\/index.jsp_GETME'>index.jsp<\/a><\/p>\n<p>Link to NetBeans &#8220;spiritual home&#8221; download page at <a target=_blank title='NetBeans download page' href='https:\/\/netbeans.org\/downloads\/'>NetBeans<\/a>.<\/p>\n<hr \/>\n<p id='tttoe'>Previous <a target=_blank title='Tic Tac Toe' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=454'>Tic Tac Toe<\/a> game shown below.<\/p>\n<table title='Click a box to make your move in Noughts and Crosses game against Computer' ondblclick='window.open(\"http:\/\/www.rjmprogramming.com.au\/Games\/Noughtsandcrosses\/\",\"_blank\");'>\n<tbody style=\"background-color:pink;\">\n<tr>\n<td style=\"border-right: 2px solid red;border-bottom: 2px solid red;\" id=\"t11\"><img decoding=\"async\" id=\"11\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-bottom: 2px solid red;\" id=\"t12\"><img decoding=\"async\" id=\"12\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-bottom: 2px solid red;\" id=\"t13\"><img decoding=\"async\" id=\"13\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;\" id=\"t21\"><img decoding=\"async\" id=\"21\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td id=\"t22\"><img decoding=\"async\" id=\"22\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;\" id=\"t23\"><img decoding=\"async\" id=\"23\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<tr>\n<td style=\"border-right: 2px solid red;border-top: 2px solid red;\" id=\"t31\"><img decoding=\"async\" id=\"31\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-top: 2px solid red;\" id=\"t32\"><img decoding=\"async\" id=\"32\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<td style=\"border-left: 2px solid red;border-top: 2px solid red;\" id=\"t33\"><img decoding=\"async\" id=\"33\" src=\"ttnone.png\" onclick=\"doit(this);\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"#post-454\" title=\"Coward's way out?\" onclick=\"newgame();\">New game<\/a><\/p>\n<p>Here is a great movie&nbsp;<a target=_blank title='War Games (Matthew Broderick)' href='http:\/\/www.youtube.com\/watch?v=NHWjlCaIrQo'>scene<\/a>&nbsp;that springs to mind.<\/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='#d454' onclick='var dv=document.getElementById(\"d454\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=44\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d454' 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='#d4622' onclick='var dv=document.getElementById(\"d4622\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Java\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d4622' 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='#d7092' onclick='var dv=document.getElementById(\"d7092\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Javascript\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7092' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s tutorial is ideally (designed) for the writers of blog posts who administer their blog&#8217;s content, and augments the content of NetBeans Java Web Application Primer Tutorial as shown below, to illustrate that within your WordPress (Blog) Posting you can &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-in-your-wordpress-post-primer-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":[12,37],"tags":[151,216,576,652,970,997,1319,1456,1467],"class_list":["post-7092","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-blog","tag-cms","tag-html","tag-javascript","tag-post","tag-programming","tag-tutorial","tag-wordpress","tag-wysiwyg"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7092"}],"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=7092"}],"version-history":[{"count":1,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7092\/revisions"}],"predecessor-version":[{"id":20033,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7092\/revisions\/20033"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}