Dynamically adding and removing text boxes and buttons via drop down menu
Hey, I'm just beginning the planning for the stucture of a program which is going to include a certain amount of sets of buttons and text boxes, depending on which option is chosen in a drop down menu. It would be hosted online, and someone suggested scripting it, but I'm not as experienced when it comes to scripts.
I'd like to know how, if there are already say 7 sets of button and text box groups, to, after recieving input from a drop menu, change the number to 5 sets of buttons and boxes.
Would it be easier with jscript and html?
Thanks
# 1
Deciding to use Javascript versus Java has a lot more to do with your requirements and target market than ease of development. Java is a heavyweight solution to the problem whereas Javascript is a lightweight solution...maybe.
Some things to consider:
1) If it's hosted, it's either a Java Webstart app or an applet. If you're sending data back to a server, there's a lot more work involved on the Java side than the Javascript side, IMO.
2) Not everyone uses a Javascript-enabled browser and not everyone has Java, which is required to run Java applets. There are probably more that have the former than the latter.
3) Java is sometimes version dependent - you may need to require a certain version of Java or above. Javascript is version and browser and OS dependent. Your javascript could get very messy very quickly depending on how versatile you want to be.
4) Is there something on the back end of this program? Either a server application, a servlet container, or a full web application server? Do you have to write it? Do you have to understand how to deploy it?
There are plenty more, but you get the idea. You're going to have to have a set of requirements and a lot of research to determine which way you want to go.
Of course, then you can get into things like Google Web Toolkit that allow you to write Java to generate Javascript...