From d220b5f8e86d1c8b4503948c09f2497d11710d98 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 3 Mar 2014 11:40:05 -0500 Subject: Some of the stuff I forgot to commit last night. Updated and cleaned up some pages as well as getting the gameType listing to work. --- app/assets/javascripts/ajax.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/assets/javascripts/ajax.js (limited to 'app/assets') diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js new file mode 100644 index 0000000..2b2bb3e --- /dev/null +++ b/app/assets/javascripts/ajax.js @@ -0,0 +1,14 @@ +function populate() { + //populate optionArray + //make a form element + var e = document.getElementById("tournament_id"); + var gameType = e.options[e.selectedIndex].text; + if (gameType != "") { + //populate optionArray + + for(var option in optionArray){ + //identify the number of + ; + } + }; +} \ No newline at end of file -- cgit v1.2.3-2-g168b From def21c442c6e4b52b50f852cedd3e8bcaf436f9d Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 3 Mar 2014 13:17:02 -0500 Subject: Changed the views for tournament a little more. --- app/assets/javascripts/ajax.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/assets') diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js index 2b2bb3e..475dddc 100644 --- a/app/assets/javascripts/ajax.js +++ b/app/assets/javascripts/ajax.js @@ -3,9 +3,10 @@ function populate() { //make a form element var e = document.getElementById("tournament_id"); var gameType = e.options[e.selectedIndex].text; - if (gameType != "") { + if (gameType != "Select a Game Type") { + alert(gameType + " was Selected!"); //populate optionArray - + //select * from tournament_settings where gametype = GameType for(var option in optionArray){ //identify the number of ; -- cgit v1.2.3-2-g168b From 7a8f0a0c74c96fcde2a38fbf98123b6c8d44308c Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Mon, 3 Mar 2014 15:03:26 -0500 Subject: Added some partial rendering. --- app/assets/javascripts/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/assets') diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js index 475dddc..31578dd 100644 --- a/app/assets/javascripts/ajax.js +++ b/app/assets/javascripts/ajax.js @@ -5,7 +5,7 @@ function populate() { var gameType = e.options[e.selectedIndex].text; if (gameType != "Select a Game Type") { alert(gameType + " was Selected!"); - //populate optionArray + //populate optionArray via AJAX //select * from tournament_settings where gametype = GameType for(var option in optionArray){ //identify the number of -- cgit v1.2.3-2-g168b