Forum Moderators: open
When the user selects an entry, I need to display that number of lines for name input:
Name: <input> Age: <input>
I can do it with a refresh of the screen, but I don't want to do that. It should be seamless.
I know the code to write the javascript:
for (var i = 0; i < String(document.formSel.evt.value).substr(1,1); i++){
document.write("Name <input type=text class=inputbox size=20 name=names> Grade <input type=text name=grade size=3 class=inputbox><br>");
}
but I need to figure out how to write it with an onChange event from the drop down box.
I already do similar things with divs and show/hide, but this is different. I want to dynamically create the needed number of lines.
I tried creating a function, but I don't know how I would send the resulting function output to the proper spot on the page.
Any ideas?