reset password
Author Message
CSr_esco525
Posts: 15
Posted 14:06 Nov 07, 2015 |

Hey Guys! Sorry for bothering you at this moment if you are doing something important, but can anyone help me out on making a table for Lab 7. I do not know how to make or even start one in Java Script. 

*NOTE : I am new to Java Script, I have not taken a coding class in high school, so this is kinda tough for me! Although I do understand it in some way, but it is difficult for me to make something this complex.

 To those who are not understanding what the Lab is about, we have to create a chess board based off the number of rows and columns the player types in. So my question is how do I make a table based off the number the player inputs?

HERE IS THE CODE I CURRENTLY HAVE FOR ROW (x) AND COLUMN (y):

<script>

    var x, text;
        function rFunction() {
            
            x = document.getElementById("numbR").value;
            
            if (isNaN(x) || x < 2 || x > 15) {
                text = "Incorrect! Put a number from 2 to 15!";
                }
            else {
                text = "Nice! Proceed on to the next one!";
                }
            document.getElementById("nice1").innerHTML = text;
                }
        
        
        function cFunction() {
            var y, text;
            y = document.getElementById("numbC").value;

            if (isNaN(y) || y < x || y > 20) {
                    text = "Incorrect! Put a number between the row number you choose and 20!";
                } 
                
            else {
                    text = "Nice! Enjoy!";
                }
                
                document.getElementById("nice2").innerHTML = text;
                }

</script>

Thanks! I wish the best of luck to all of you!

epicboba
Posts: 5
Posted 21:22 Nov 08, 2015 |

Been working on it for few days ... STILL STUCK ON DISPLAYING TABLE ....>!>>!>!>!>!>!>!>!?!??!?! >_<