Priya Rengaraj

Greenhorn
+ Follow
since Dec 20, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Priya Rengaraj

Hi,

Please help me on the following:

I have a employee main jsp which where employeee search is performed. On the same page, I have a button to Create an employee. (createEmployee.jsp) .
In the createEmployee Page , when I enter the form data and click on save button, I need to submit the form and save the data and also go back to main page displaying the created employee information in the main page.

I need to use document.form.action and submit and need not window.open............ The create page looks like

<html>
..........
<form action = "createEmployee.jsp" method = "post" name = "createEmpForm">

.......... Form elements and data .............
........... Scriplets to call methods that save data....

<button name = "Save" onclick = "onSave()"; type = "submit"; .........../>
</form>

javascript function:

onSave(){
document.createEmpForm.action = "EmployeeMain.jsp";
documen.createEmpForm.submit();
}


But it doesnt work...

Please help with sample codes if possible.
12 years ago
JSP