summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ajax.js')
-rw-r--r--app/assets/javascripts/ajax.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/ajax.js b/app/assets/javascripts/ajax.js
new file mode 100644
index 0000000..31578dd
--- /dev/null
+++ b/app/assets/javascripts/ajax.js
@@ -0,0 +1,15 @@
+function populate() {
+ //populate optionArray
+ //make a form element
+ var e = document.getElementById("tournament_id");
+ var gameType = e.options[e.selectedIndex].text;
+ if (gameType != "Select a Game Type") {
+ alert(gameType + " was Selected!");
+ //populate optionArray via AJAX
+ //select * from tournament_settings where gametype = GameType
+ for(var option in optionArray){
+ //identify the number of
+ ;
+ }
+ };
+} \ No newline at end of file