ESL Vocabulary Game - Under the Stairs++ - Reworking the HTML Map Tag - RJM Programming - November, 2015
---
> Under the Stairs - Reworking the HTML Map Tag - RJM Programming - November, 2015
18,19d17
< var htmlchoice='under_the_stairs.html';
< var lasthtmlchoice='under_the_stairs.html';
22d19
< var amin=false;
25,27d21
< var doneonce=0;
< var places=["Living Room","wordpress/livingroom.html","Living Room Corner","livingroom_corner.html","Bathroom Corner","bathroom_corner.html","Kitchen Corner","KitchenCorner/index.html","Laundry Corner","wordpress/laundry_things.html","Study Corner","studycorner.html","Where is Wally?","where_is_wally.html"];
<
36,40d29
< if (choice.indexOf('.htm') != -1 && htmlchoice != 'under_the_stairs.html') {
< doneonce = 0;
< contents=aconto.body.innerHTML;
< if (contents != "") process();
< }
49,59c38
<
< var selih="";
< var prefixbit='';
< for (var ip=0; ip" + places[eval(ip + 0)] + " - Click and Be Prompted";
< selih+=prefixbit + "";
< }
<
< //mydivbit = mydivbit.replace("", "
");
< mydivbit = mydivbit.replace("", "
");
---
> mydivbit = mydivbit.replace("", "
");
71,79c50,51
< if (selo != null) {
< choice=selo.value;
< htmlchoice=choice.replace(".html","").replace(".htm","") + ".html";
< if (htmlchoice != lasthtmlchoice) {
< lasthtmlchoice=htmlchoice;
< document.getElementById('utsif').src=htmlchoice;
< }
< }
< if (choice.indexOf('.htm') != -1 && htmlchoice == 'under_the_stairs.html') {
---
> if (selo != null) choice=selo.value;
> if (choice.indexOf('.htm') != -1) {
84c56
< if (contents != "" && htmlchoice == 'under_the_stairs.html') process();
---
> if (contents != "") process();
89,90d60
< if (doneonce == 0) {
< doneonce=1;
98c68
< if (areas[ia].href != "") objects.push(areas[ia].href.replace('http://www.merriam-webster.com/dictionary/','').replace('http://encyclopedia.thefreedictionary.com/','').replace('http://www.thefreedictionary.com/','').replace("+"," ").replace("+"," ").replace("+"," ").replace("+"," ").replace("+"," ") + ";" + areas[ia].coords);
---
> if (areas[ia].href != "") objects.push(areas[ia].href.replace('http://www.thefreedictionary.com/','').replace("+"," ").replace("+"," ").replace("+"," ").replace("+"," ").replace("+"," ") + ";" + areas[ia].coords);
103d72
< }
131,137c100
< if (thisobj == lastobj) {
< if (htmlchoice.indexOf('wally') != -1) {
< lastobj='';
< } else {
< snum = Math.floor(Math.random() * objects.length) + 0;
< }
< }
---
> if (thisobj == lastobj) snum = Math.floor(Math.random() * objects.length) + 0;
140,144c103
< if (htmlchoice.indexOf('wally') != -1) {
< alert("Where's Wally?");
< } else {
< alert("Please click '" + thisobj + "'.");
< }
---
> alert("Please click '" + thisobj + "'.");
162c121
< function calcdist() {
---
> function calcdist() { //(event) {
165,166d123
< if (amin) return false;
< amin=true;
169a127
> //alert(theseobjs[1]);
171c129,138
< for (var ijh=2; ijh
> //if (event.clientX || event.clientY) {
> // x = event.clientX;
> // y = event.clientY;
> // } else {
> // x = event.pageX;
> // y = event.pageY;
> // }
>
> for (var ijh=2; ijh //alert('x=' + x + ' y='+ y + ' ijh=' + ijh + ' area=' + area);
174c142
< if (eval(base) > 0.001) {
---
> //alert('ijh=' + ijh + ' base=' + base);
175a144
> //alert('ijh=' + ijh + ' height=' + height);
178,179d146
< //alert(x + ',' + y + ' ... ' + theseobjs[1] + ' ... ' + area + ' ... ' + base + ' ... ' + smallesth);
< }
181,203c148,171
< }
< var cnf;
< if (eval(smallesth) < 3) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is boiling. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 10) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is very hot. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 20) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is very warm. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 40) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is warm. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 80) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is lukewarm. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 120) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is cool. Cancel gives up, other answer will give dictionary view.","");
< } else if (eval(smallesth) < 160) {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is cold. Cancel gives up, other answer will give dictionary view.","");
< } else {
< cnf=prompt("Sorry, this is not " + thisobj + ", and it is freezing. Cancel gives up, other answer will give dictionary view.","");
< }
< if (cnf == null) {
< eval("aconto.getElementById('" + midis + "').title='';");
< } else {
< if (cnf.length == 0) {
---
> }
>
> var cnf;
> if (eval(smallesth) < 3) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is boiling. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 10) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is very hot. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 20) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is very warm. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 40) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is warm. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 80) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is lukewarm. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 120) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is cool. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 160) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is cold. Cancel gives up, other answer will give dictionary view.","");
> } else if (eval(smallesth) < 160) {
> cnf=prompt("Sorry, this is not " + thisobj + ", and it is freezing. Cancel gives up, other answer will give dictionary view.","");
> }
> if (cnf == null) {
> eval("aconto.getElementById('" + midis + "').title='';");
> } else {
> if (cnf.length == 0) {
205d172
< amin=false;
207c174
< } else {
---
> } else {
209,212c176,178
< }
< }
< amin=false;
< return false;
---
> }
> }
> return false;
218c184
< var ih='';
---
> var ih='';
227d192
<