View Full Version : Create Form Object, and Have Javascript read it.

11-03-2006, 05:36 AM
Can somebody please post me a sample code of creating a form object (textbox) and that is read and put into the array called sampArray that has an indefinite (or 100 if that's not possible) amount of elements. I want it so that when you hit the submit button, it shall take it, and check to see if it's a number. If it is, it will add it with the last digit, which starts at 0, and print the result in another textbox. There will also be another button that when clicked, will initialize a for loop. Please use (i=0; ...; i++) as what needs to be done. You need to fill in the ... . During every pass through the loop, it shall take sampArray[i] and post it followed by a new line.

I only ask of this because I learn visually. I tried to be as specific as possible, so if you need any extra information, just ask. I need to see the code. Also, is there a way to make a form action equal none?

Thanks in advanced. Havvy.

11-03-2006, 06:31 AM
Is this an assignment?

11-03-2006, 11:24 PM
No. I don't know of any javascript classes. I do know of one for VB Script and I'm in the class before that, which is the logic of programs. I'm learning javascript for me, and only me. Forms are what I'm trying to figure out how forms work. I learn visually and long explanations, such as the description I wrote isn't going to help me. It can help some though.

What I hope this shows me what the properties of forms, and how they are made are. I'm not a cheater. I just have no clue how to mess with forms, and I don't have any assignment right now.

If you want, think of an assignment for the person who answers my question.