I'm not sure what search terms to put in to find a sample JavaScript that will give me what I need.
I have a Scrambled word game whereby the ONLY thing that changes with the different games is the link to the JavaScript. I know that I can make a page that has 1 HTML page, and a link to the various JS files, whereby the user can choose which game that want to play, without having 26 separate HTML files. However, I do not know how to research to find a code like this, nor can I figure out how to program this.
HTML page
JS drop down Menu
Wanted Result: JS code grabbed, with HTML page showing whats needed for game to be playable, but access the answers from the JS page.
I know that I have to use an Array, with links to the JS files, and some sort of drop down menu, but I don't know how to get the current HTML file, to show the game but with the JS chosen for playing the game. PS. My JavaScript knowledge is extreme newbie with brain damage. I'm only beginning to understand some JS concepts. Thanks in advance!
The code as it stands is: JavaScript - var word=new Array("waschbecken","toilette","seife","badewanne","wasserhahn","handtuch","dusche","waschlappen","toilettenpapier","wasser","zahnpasta","zahnbürste");
-
var letter=new Array();
-
var rand;
-
var actual;
-
window.onload=main;
-
function main()
-
{
-
getRand();
-
scrambleWord();
-
creatWord();
-
}
-
function scrambleWord()
-
{
-
actual=word[rand];
-
Temp=word[rand].length;
-
for(var myx=0;myx<Temp+2;myx++)
-
{
-
zmyx1=myx-1;
-
letter[myx]=word[rand].substring(zmyx1,zmyx1-1)
-
}
-
letter.sort();
-
word[rand]="";
-
for(var myx=0;myx<Temp+2;myx++)
-
word[rand]+=letter[myx];
-
}
-
function getRand()
-
{
-
rand=Math.floor(Math.random()*word.length);
-
}
-
function creatWord()
-
{
-
for(var x=0;x<word[rand].length+2;x++)
-
{
-
zmyx1=x-1;
-
a=document.createElement('a');
-
a.id="aid"+x;
-
a.className="scramble";
-
a.innerHTML=word[rand].substring(zmyx1,zmyx1-1);
-
a.href="javascript:append('"+x+"');";
-
document.getElementById('board').appendChild(a);
-
}
-
}
-
function creatWord2(x)
-
{
-
zmyx1=x-1;
-
a=document.createElement('a');
-
a.id="aid2"+x;
-
a.className="scramble";
-
a.innerHTML=word[rand].substring(zmyx1,zmyx1-1);
-
a.href="javascript:retract('"+x+"');";
-
document.getElementById('assemble').appendChild(a);
-
-
}
-
function append(zmyx1)
-
{
-
document.getElementById('aid'+zmyx1).style.visibility="hidden";
-
//document.getElementById('assemble').innerHTML+=document.getElementById('aid'+zmyx1).innerHTML;
-
creatWord2(zmyx1);
-
}
-
function retract(zmyx1)
-
{
-
document.getElementById('aid'+zmyx1).style.visibility="visible";
-
elem=document.getElementById('aid2'+zmyx1);
-
document.getElementById('assemble').removeChild(elem);
-
}
-
function showWord()
-
{
-
document.getElementById('theWord').innerHTML=actual;
-
}
-
HTML code 13 1937
Forget the code above as its not even close to what I should have posted. Sorry!
Here's what I've got so far. I do not know how to get the Arrays to communicate and then have html code use the JS selected.
Thanks! -
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
<html lang="utf-8">
-
<head>
-
<title> Scrambled Words </title>
-
-
<META http-equiv="expires" content="Thur, 1 March 2007 13:00:00 GMT">
-
<meta http-equiv="Content-Type" content="text/html charset=utf-8">
-
<link type="text/css" rel="stylesheet"
-
href="http://www.globalwritersclub.com/gaming/2/word/scrambled/css/scrambled.css">
-
<script type="text/javascript" src="http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/1a.js">
-
</script>
-
-
<!-- hangman script originally by Chris Fortey @ http://www.c-g-f.net -->
-
-
<script language="JavaScript" type="text/javascript">
-
-
var wordlistAry=['1a.js'];
-
var wordlistAry2=['1b.js'];
-
var wordlistAry3=['1c.js'];
-
var wordlistAry4=['1d.js'];
-
var wordlistAry5=['1e.js'];
-
var wordlistAry6=['1f.js'];
-
var wordlistAry7=['1g.js'];
-
var wordlistAry8=['1h.js'];
-
var wordlistAry9=['1i.js'];
-
var wordlistAry10=['1j.js'];
-
var wordlistAry11=['1k.js'];
-
var wordlistAry12=['1l.js'];
-
-
-
// The Default Image Path
-
var var wordlistPath='http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/';
-
-
var UseAry=var wordlistAry; // the default var wordlist Array
-
-
-
var SelAry=[];
-
// Each field is an array defining an option
-
// field 0 = the text to be displayed in the option
-
// field 1 = the directory path for the images (JS in this case)
-
// field 2 = the image file names] (Array = 1A or 1B or 1C, etc.)
-
SelAry[0]=[];
-
SelAry[1]=['DE 1A','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry];
-
SelAry[2]=['DE 1B','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry2];
-
SelAry[3]=['DE 1C','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry3];
-
SelAry[4]=['DE 1D','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry4];
-
SelAry[5]=['DE 1E','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry5];
-
SelAry[6]=['DE 1F','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry6];
-
SelAry[7]=['DE 1G','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry7];
-
SelAry[8]=['DE 1H','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry8];
-
SelAry[9]=['DE 1I','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry9];
-
SelAry[10]=['DE 1J','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry10];
-
SelAry[11]=['DE 1K','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry11];
-
SelAry[12]=['DE 1L','http://www.globalwritersclub.com/gaming/2/word/evapbook/eb/de/js/',wordlistAry12];
-
-
</script>
-
-
</HEAD>
-
-
<body onLoad="reset(); return true;">
-
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" Summary="NAV TABLE">
-
<tr><td>
-
<input type="text" id="Name" value="" size="20" class="TxtArea" ><br>
-
<select id="Selectwordlist" onchange="Chgwordlist(this);" class="TxtArea" >
-
<option >Select wordlist</option>
-
-
</select>
-
</td></tr>
-
-
<tr>
-
<td class="tcp">
-
-
<br>
-
The Book Rescue
-
<br>
-
Plug in your guesses below!<br>
-
You have 12 guesses.
-
<br> <br>
-
-
<img src="/gaming/2/word/evapbook/12/hmstart.gif" height="230" width="266" name="hm" alt="Image used to display stages of errors.">
-
-
<form name="game">
-
<p><center>
-
Display Word: <input type="text" name="displayWord"><br>
-
Used Letters: <input type="text" name="usedLetters"> </center></p>
-
</form>
-
-
<p><center>
-
<a href="javascript:selectLetter('a');" onclick="this.style.color='#ff0000'">a</a> |
-
<a href="javascript:selectLetter('ä');" onclick="this.style.color='#ff0000'">ä</a> |
-
<a href="javascript:selectLetter('b');" onclick="this.style.color='#ff0000'">b</a> |
-
<a href="javascript:selectLetter('c');" onclick="this.style.color='#ff0000'">c</a> |
-
<a href="javascript:selectLetter('d');" onclick="this.style.color='#ff0000'">d</a> |
-
<a href="javascript:selectLetter('e');" onclick="this.style.color='#ff0000'">e</a> |
-
<a href="javascript:selectLetter('f');" onclick="this.style.color='#ff0000'">f</a> |
-
<a href="javascript:selectLetter('g');" onclick="this.style.color='#ff0000'">g</a> |
-
<a href="javascript:selectLetter('h');" onclick="this.style.color='#ff0000'">h</a> |
-
<a href="javascript:selectLetter('i');" onclick="this.style.color='#ff0000'">i</a> |
-
<a href="javascript:selectLetter('j');" onclick="this.style.color='#ff0000'">j</a> |
-
<a href="javascript:selectLetter('k');" onclick="this.style.color='#ff0000'">k</a> |
-
<a href="javascript:selectLetter('l');" onclick="this.style.color='#ff0000'">l</a>
-
<a href="javascript:selectLetter('m');" onclick="this.style.color='#ff0000'">m</a>
-
<a href="javascript:selectLetter('n');" onclick="this.style.color='#ff0000'">n</a> | <br />
-
<a href="javascript:selectLetter('o');" onclick="this.style.color='#ff0000'">o</a> |
-
<a href="javascript:selectLetter('ö');" onclick="this.style.color='#ff0000'">ö</a> |
-
<a href="javascript:selectLetter('p');" onclick="this.style.color='#ff0000'">p</a> |
-
<a href="javascript:selectLetter('q');" onclick="this.style.color='#ff0000'">q</a> |
-
<a href="javascript:selectLetter('r');" onclick="this.style.color='#ff0000'">r</a> |
-
<a href="javascript:selectLetter('s');" onclick="this.style.color='#ff0000'">s</a> |
-
<a href="javascript:selectLetter('t');" onclick="this.style.color='#ff0000'">t</a> |
-
<a href="javascript:selectLetter('u');" onclick="this.style.color='#ff0000'">u</a> |
-
<a href="javascript:selectLetter('ü');" onclick="this.style.color='#ff0000'">ü</a> |
-
<a href="javascript:selectLetter('v');" onclick="this.style.color='#ff0000'">v</a> |
-
<a href="javascript:selectLetter('w');" onclick="this.style.color='#ff0000'">w</a> |
-
<a href="javascript:selectLetter('x');" onclick="this.style.color='#ff0000'">x</a> |
-
<a href="javascript:selectLetter('y');" onclick="this.style.color='#ff0000'">y</a> |
-
<a href="javascript:selectLetter('z');" onclick="this.style.color='#ff0000'">z</a> </center> </p>
-
<p>
-
<a href="javascript:reset()">Start game / Reset game</a></p>
-
</table>
-
</body>
-
</html>
-
-
I realize that with the amount of brain damage I have, I should really try something easier, like knitting. But, can anyone tell me what search terms might help me? Or, can someone point me to the code that I'm missing? Thanks! :D
My issue is that I can not figure out how to do the code bit that tells the computer what to do with the JS selection. I'm sure I can get the code to post the JS in a window, but that is not what I want. The code snippet I do have, make a playing field, for memory. This is not very useful. I have the complete code for the game, I just need the computer to use the JS file for the game and the HTML file for the other half of the game code and marry the 2. I thought that document.write wouldn't do it, as it would just print whatever instead of do whatever.
Thanks!
My question I'd still like an answer to is:
1) What search terms does one use to figure out how to marry input choice with html page to get the js file chosen to be put into the html page. I would like to read more about this, but my search terms do not quite give me the write resources. All I get is how to make drop down navigation menus. :P
I did come up with a very silly, very newbie solution. Write the entire HTML page in JS such that one uses if else else else statements for all the possible choices. In this case, 1 IF and 11 else statements. Thus, if selection is 1a.js, then document write statement would be the javascript link to 1a.js file.
I'd still use the drop down menu for choices, but I'm not exactly sure if there is a line I need between the drop down menu and the if else statement.
2) My other question:
Given the newbie solution above, what is the "proper search terms" that will give me the right article to read that would help me with the newbie type solution?
Thanks!
signed perplexed who is researching how to write an HTML page completely in JS, a solution I was trying to avoid!
Yes, I'm communicating with myself. No problem, I did manage to connect with the solution to my other problem, thus didn't need a response. :D People are busy, and I'm fine with that.
Naysayers:
Believe it or not, I do wait a considerable amount of time before I post my questions. Matter of a fact, I won't be posting much JS questions only because I'm just beginning to connect with the language. Give it another year. Many of the questions I do have, I feel should wait until I've worked out at least the direction I should be searching in.
Many thanks! :D
I finally got drop down menu out of my head (which was why I asked for search terms), and finally found JS for Beginners, and wrote this (which does not work). I still think that there is something I'm not reading, and need to read. The code is my own slaughtering of JS. ;) -
<SCRIPT LANGUAGE="JavaScript"> <!--
-
function mychoice()
-
-
if {(mychoice = "1a") then (document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1a.js"></script>');
-
}
-
else
-
{(mychoice = 1b) then (document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1b.js"></script>');
-
}
-
else
-
{(mychoice = 1c) then (document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1c.js"></script>');
-
}
-
else
-
{(mychoice = 1d) then (document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1d.js"></script>');
-
}
-
else
-
(mychoice = 1e) then (document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1e.js"></script>');
-
-->
-
</script>
-
<form>
-
<input type="checkbox" name="mychoice" value="1a" onclick="mychoice()"> 1A <br>
-
<input type="checkbox" name="mychoice" value="1b" onclick="mychoice()"> 1B <br>
-
<input type="checkbox" name="mychoice" value="1c" onclick="mychoice()"> 1C <br>
-
<input type="checkbox" name="mychoice" value="1d" onclick="mychoice()"> 1D <br>
-
<input type="checkbox" name="mychoice" value="1e" onclick="mychoice()"> 1E <br>
-
-
</form>
-
Forget the code I just posted. I forgot to fix the "then". I've got this code all wrong and I know it, but don't know how to fix it. Apparently, I'm still getting lost with the brackets and if else statements. I did finally figure out some search terms to use - document objects, and if/else statements. Originally, the previous search terms was what I was looking for. Now however that I found the search terms, and came up with the following catastrophe, what next? Thanks! -
<SCRIPT LANGUAGE="JavaScript"> <!--
-
function mychoice()
-
-
if (mychoice = "1a") {(document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1a.js"></script>');
-
}
-
else
-
(mychoice = 1b) {(document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1b.js"></script>');
-
}
-
else
-
(mychoice = 1c) {(document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1c.js"></script>');
-
}
-
else
-
(mychoice = 1d) {(document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1d.js"></script>');
-
}
-
else
-
(mychoice = 1e) {(document.write'<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1e.js"></script>');
-
}
-
-->
-
</script>
-
<form>
-
<input type="checkbox" name="mychoice" value="1a" onclick="mychoice()"> 1A <br>
-
<input type="checkbox" name="mychoice" value="1b" onclick="mychoice()"> 1B <br>
-
<input type="checkbox" name="mychoice" value="1c" onclick="mychoice()"> 1C <br>
-
<input type="checkbox" name="mychoice" value="1d" onclick="mychoice()"> 1D <br>
-
<input type="checkbox" name="mychoice" value="1e" onclick="mychoice()"> 1E <br>
-
</form>
-
<tr>
-
<td class="ctr">
-
-
<br />
-
-
<span id="board"></span>
-
<br /><br />
-
<span id="assemble"></span>
-
<br />
-
<br />
-
<span id="theWord"></span>
-
<form>
-
<br />
-
<input type="button" value="^-^ ?" onclick="showWord();" />
-
-
<b style="visibility:hidden">__</b>
-
<input type="button" value="Start!" onclick="javascript:history.go(0);" />
-
-
</form>
-
-
</td>
-
</table>
-
-
Last thing I tried is this, and this time I'm posting the entire code because the Start doesn't even begin to communicate with the choice given by the user. I had meant to use else if statements, as I have 5 choices. Eventually, I'll have choices 1A - 1L, but thought 5 would be good for starters to figure out the code.
Thanks!
Fixed some obvious errors. :D I know there are many more errors, but this is what I've got. Any other errors I don't see yet. I'm not reposting the entire page as I am convinced that out of the box this script is all wrong! Currently, I am reading forms and JavaScript, plus writing HMTL in JS.
Any suggestions greatly appreciated. I'll check back in here tomorrow, as I'm still talking with myself. However, MANY people need help, and I only wish I was a better programmer. Even my HTML is 4.01 and outdated. lol -
<SCRIPT LANGUAGE="JavaScript"> <!--
-
function myChoice()
-
-
if(myChoice = "1a") {
-
document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1a.js"></script>');
-
}
-
-
else if {
-
(myChoice = "1b") {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1b.js"></script>');
-
}
-
}
-
else if {
-
(myChoice = 1c) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1c.js"></script>');
-
}
-
}
-
else if {
-
(myChoice = 1d) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1d.js"></script>');
-
}
-
}
-
else {
-
(myChoice = 1e) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1e.js"></script>');
-
}
-
}
-
-->
-
</script>
-
<form>
-
<input type="checkbox" name="myChoice" value="1a" onclick="myChoice(1a)"> 1A <br>
-
<input type="checkbox" name="myChoice" value="1b" onclick="myChoice(1b)"> 1B <br>
-
<input type="checkbox" name="myChoice" value="1c" onclick="myChoice(1c)"> 1C <br>
-
<input type="checkbox" name="myChoice" value="1d" onclick="myChoice(1d)"> 1D <br>
-
<input type="checkbox" name="myChoice" value="1e" onclick="myChoice(1e)"> 1E <br>
-
</form>
-
-
Question: Should I bump this thread every 10 hours???? Someone posted 1 day ago and already got help! I've post SEVEN DAYS AGO and am talking with myself. Oops! o_O O_o :D
Latest bit I've tried. What happens is nothing. I need it to actually show the word and use the JS file that was chosen. The on click show word does nothing. I'm not sure how to fix that, or what else I have wrong. Thanks!
(I think I'm done tinkering with this code, as I don't know what else to reread. I'm just glad that my brain is finally connecting this far. ) thanks! -
-
<table border="2" align="center" width="100%" cellpadding="5" border="2">
-
<tr><td>
-
-
<SCRIPT LANGUAGE="JavaScript"> <!--
-
-
function myChoice()
-
-
if(myChoice = 1a) {
-
document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1a.js"></script>');
-
}
-
-
else if {
-
(myChoice = 1b) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1b.js"></script>');
-
}
-
}
-
else if {
-
(myChoice = 1c) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1c.js"></script>');
-
}
-
}
-
else if {
-
(myChoice = 1d) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1d.js"></script>');
-
}
-
}
-
else {
-
(myChoice = 1e) {document.write('<script language="Javascript" src="http://www.globalwritersclub.com/gaming/2/word/scrambled/de/js/1e.js"></script>');
-
}
-
}
-
-->
-
</script>
-
<form>
-
<input type="checkbox" name="1a" value="1a" onclick="myChoice(form.1a.value)"> 1A <br>
-
<input type="checkbox" name="1b" value="1b" onclick="myChoice(form.1b.value)"> 1B <br>
-
<input type="checkbox" name="1c" value="1c" onclick="myChoice(form.1c.value)"> 1C <br>
-
<input type="checkbox" name="1d" value="1d" onclick="myChoice(form.1d.value)"> 1D <br>
-
<input type="checkbox" name="1e" value="1e" onclick="myChoice(form.1e.value)"> 1E <br>
-
</form>
-
-
-
-
<tr>
-
<td class="ctr">
-
-
<br />
-
-
<span id="board"></span>
-
<br /><br />
-
<span id="assemble"></span>
-
<br />
-
<br />
-
<span id="theWord"></span>
-
<form>
-
<br />
-
<input type="button" value="^-^ ?" onclick="showWord();" />
-
-
<b style="visibility:hidden">__</b>
-
<input type="button" value="Start!" onclick="javascript:history.go(0);" />
-
-
</form>
-
-
</td>
-
</table>
-
gits 5,390
Expert Mod 4TB
basicly when you use document.write() after page load the dom is corrupted and the page will be destroyed ...
as you might see from the scripts that you want to include ... they rely on a window.onload() event which is only fired once the page loads ...
so you would need to eval the scripts explicitly and then call the main() method ...
kind regards
Is there a better way to do this entire code such that eval function does not need to be used? I've found 2 different websites that say eval function is too easily hacked and not recommended if one can't trust the users.
Also, can you recommend what I should be reading? I am still very confused by everything.
Thanks!
gits 5,390
Expert Mod 4TB
most secure way would be to post the selection back to the server and include the correct js file and then send back the right page to the client ... when you want to add js code dynamically on a page you cannot avoid eval ...
Here was a solution that someone else game me. - <script language="Javascript">
-
var words = [
-
["sink","toilet","soap","bathtub","faucet","towel","sponge","washcloth","toiletpaper","water","toothpaste","toothbrush"],
-
["mirror","bed","dresser","sheets","comforter","blanket","comb","brush","closet","pillow","clock","lamp"],
-
["lightswitch","key","car","train","airplane","bike","dustpan","truck","bus","outlet","drawer","lightbulb"],
-
];
-
var word;
-
var letter;
-
var rand;
-
var actual;
-
function game(which)
-
{
-
// clear out board and assemble first:
-
var span = document.getElementById('board');
-
while ( span.childNodes.length > 0 )
-
{
-
span.removeChild(span.firstChild);
-
}
-
var span = document.getElementById('assemble');
-
while ( span.childNodes.length > 0 )
-
{
-
span.removeChild(span.firstChild);
-
}
-
document.getElementById('theWord').innerHTML = "";
-
letter = new Array( );
-
-
// NOW start new game:
-
wordset = words[which];
-
word = wordset[ Math.floor(Math.random()*wordset.length) ];
-
scrambleWord();
-
creatWord();
-
}
-
function scrambleWord()
-
{
-
actual=word;
Then the snippet of the HTML code needed is this... - <a href="#" onclick="game(1);return false;"> 1D - F </a> |
-
<a href="#" onclick="game(2);return false;"> 1G - I </a> |
-
<a href="#" onclick="game(3);return false;"> 1J - L </a> ||
-
</form>
-
-
-
-
<tr>
-
<td class="ctr">
-
-
<br />
-
-
<span id="board"></span>
-
<br /><br />
-
<span id="assemble"></span>
-
<br />
-
<br />
-
<span id="theWord"></span>
-
<form>
-
<br />
-
<input type="button" value="^-^ ?" onclick="showWord();" />
-
</form>
-
This works for as many games as you want to put on one page. It does put all of the JS on the same page as the HTML, but I can live with that. I'm studying this code to see if I can convert the Hangman code to have this feature.
Thanks!
Sign in to post your reply or Sign up for a free account.
Similar topics
by: JimC |
last post by:
Think I asked this once before. My apologies for asking twice.
In a certain PHP document at my site, I have a link to a Word version of the
same document. If the user downloads it, I want to...
|
by: BlackHawke |
last post by:
My name is Nick Soutter, I own a small game development company
(www.aepoxgames.net) making our first game (www.andromedaonline.net) in
java.
I am writing because we are having a very...
|
by: Moosebumps |
last post by:
When I have time, I am planning to evaluate Python for console game
development (on Playstation 2, GameCube, and Xbox). Does anyone have any
experience with this?
Pretty much the only resource...
|
by: EAS |
last post by:
Hey, I'm new to python (and programming in general) so I'll prolly be around
here a lot...
Anyways, I've found out how to make a "guess my number game" where the
player guesses a number between...
|
by: Mountain Bikn' Guy |
last post by:
What is the current preferred way to save user preferences in dotnet? Is the
registry the right place to do this? Can anyone recommend a good article (or
book) for this topic? Thanks.
|
by: tpgames |
last post by:
I've struck zero in finding a Link to a sudoku game that actually uses images for numbers, even images OF numbers. Yes, I'd prefer the game in JavaScript. Every site I've been too, (hundreds) uses...
|
by: JamesB |
last post by:
I am writing a service that monitors when a particular app is started.
Works, but I need to get the user who is currently logged in, and of course
Environment.UserName returns the service logon...
|
by: victoria.rego |
last post by:
Hi there,
My application is generating a "The OpenForm action was cancelled"
error and I can't seem to figure out why. The best part about it is
that it's only one user in the entire building -...
|
by: plselina011 |
last post by:
MMOPAWN is an exchange site designed specifically for game virtual
currencies and items trading.
We are trading mmorpg virtual currency ,world of warcraft account or
goods with all of the...
|
by: tech |
last post by:
Hi, i have the following problem
In file1.h
namespace A
{
class Bar
{
void foo();
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |