I have been writing plain old vanilla JavaScript pages for a while, for numerical math problems. Usually, I create one page for a specific problem.
For example, one page to solve a system of 3 Equations in 3 Unknowns, one page to solve a system of 4 Equations in 4 Unknowns, one page to solve a system of 5 Equations in 5 Unknowns, etc. In each case, the underlying algorithm does not change, just the interface on the HTML page for getting inputs from the user.
Now I'd like to try something different. I'd like the underlying program to accept data for up to a 6 x 6 matrix, and give the user the option of selecting a matrix size UP TO 6.
i.e., have radio buttons by which a user can indicate he's going to be inputting data for matrices of size 2 x 2, 3 x 3, 4 x 4, 5 x 5, 6 x 6.
But I do not want to display fields for a 6 x 6 matrix. I want the input fields to appear dynamically based on what the user selects.
Before making this selection, the data fields for input wouldn't even be displayed. Once the user selects, say, a 3 x 3 matrix, the data fields should immediately appear to accept inputs for a 3 x 3 matrix.
Can this be done with plain old JavaScript? If not, what language am I looking at that would provide this functionality?