First i have declare that i am new to javascript. I have created a form that gets Id, Name, Age & Dept. I want it to send to java class and i have to show back the data along with the other data in the data Base using DWR.
For this i already done coding for showing the table, below that i have my form. After the form "Save" button calls the below function save(). Here, my form and function.
The Form:
Id:<input type="text" id="id"/><br>
Name:<input type="text" id="name"/><br>
Age:<input type="text" id="age"/><br>
Dept:<input type="text" id="dept"/><br>
<input id="Save" type="button" value="Save" onclick="save()"/>
The function:
function save(){
employee = new Object();
employee.id = dwr.util.getValue(iD);
employee.name = dwr.util.getValue(namE);
employee.age = dwr.util.getValue(agE);
employee.dept = dwr.util.getValue(depT);
dwr.engine.beginBatch();
Employee.aouEmployee(employee); // **Java method call to store data in DB**
fetch();//An another function which loads all the data in the table.
dwr.engine.endBatch();
}
But, i cant get proper output for the above function. I am also cant able to find the mistakes(due to no error msgs)
Any suggestions will be more appreciative
Thanks
UPDATES ARE HIGHLIGHTED BY BOLD