I have a html form and 've many text boxes, dropdowns, and radios. I have given ids for each. Now i wanna populate the data from that using a js function.
//hope i can include othr things when i need in future.
This way i wanna go. And onload i creates a function,
now i want to get the datas entered in the form like this. After entering all the data in form when i clk a buttn i wanna populate those values using tis function. I just know that its an object of objects. Can ny1 explain n guide me How to do it? I m just a learner n please make it simple replys.
var UserDetails = new User( document.getElementById("CenterID"), document.getElementById('something'));
This is what i meant bro. This is working now. Im getting alert boxes aftr sumbitting data. So this is fine right? You told some constructor problem. Wats it? Is ther any error in this code.?
Now my other doubt is, I want to include 2 more fields with the function user. ie I want to add "address", " somotherthing" in the function 'user()'. How to add it? ( Without editing the user(id, center, firstName, lastName, mobileNumber) part. Can i add it like this.somthing..or nysuch ways are available??