Jasbir21
asked on
Refresh form and close window
hi,
I have a form called menu.jsp that needs to be refreshed after data gets inserted.
It is like this:
when the user clicks the add button, a pop-up window pops(adminupdate.jsp) to allow user to enter data and the data is sent to trial.jsp.
So, trial.jsp window needs to be closed with menu.jsp be refreshed.
thansk
I have a form called menu.jsp that needs to be refreshed after data gets inserted.
It is like this:
when the user clicks the add button, a pop-up window pops(adminupdate.jsp) to allow user to enter data and the data is sent to trial.jsp.
So, trial.jsp window needs to be closed with menu.jsp be refreshed.
thansk
ASKER
hi,
previously , i did put replace or reload when adminupdate.jsp is a pop-up window, the problem is adminupdate.jsp which is a pop-up window submits to trial.jsp . menu.jsp needs to be refreshed
previously , i did put replace or reload when adminupdate.jsp is a pop-up window, the problem is adminupdate.jsp which is a pop-up window submits to trial.jsp . menu.jsp needs to be refreshed
does bobbit31's javascript not work?
ASKER
hi,
... it doesn't .
thanks
... it doesn't .
thanks
You should put the javascript in the trail.jsp after update/insert success.
if still doesn't work, try:
window.opener.location.rel oad();
if still doesn't work, try:
window.opener.location.rel
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi.
You should try to submit trial.jsp from menu.jsp instead of adminupdate.jsp. Just place a hidden form on menu.jsp with all the fields of adminupdate.jsp and when you click submit, call a javascript function in menu.jsp wich copies the data from adminupdate.jsp and closes it, then submit the hidden form to trial.jsp, on trail.jsp redirect to menu.jsp and "voala" you have menu.jsp refreshed.
Have Fun
Javier
You should try to submit trial.jsp from menu.jsp instead of adminupdate.jsp. Just place a hidden form on menu.jsp with all the fields of adminupdate.jsp and when you click submit, call a javascript function in menu.jsp wich copies the data from adminupdate.jsp and closes it, then submit the hidden form to trial.jsp, on trail.jsp redirect to menu.jsp and "voala" you have menu.jsp refreshed.
Have Fun
Javier
ASKER
Thanks for the help..
How do you not make a pop up page and yet do the same thing.
I want to display a table of data from database (dynamically by calling a bean) and make one of the fields of each row as a link t open more details ..... which has to be in the same page.
3 questions:
how to keep track of where the user is in the hierarchy and which part of which record is he trying to see details for .
how to create the dynamic links to create and send the query for that record, open a page afterthat and display the result of the query.
how to return to same page after user is done viewing by "cancel" or "ok"
I am new at this and am sorry of it is a trivial question but i could not find a reply on the website.
regards,
Aashtee.
I want to display a table of data from database (dynamically by calling a bean) and make one of the fields of each row as a link t open more details ..... which has to be in the same page.
3 questions:
how to keep track of where the user is in the hierarchy and which part of which record is he trying to see details for .
how to create the dynamic links to create and send the query for that record, open a page afterthat and display the result of the query.
how to return to same page after user is done viewing by "cancel" or "ok"
I am new at this and am sorry of it is a trivial question but i could not find a reply on the website.
regards,
Aashtee.
<script language=javascript>
window.opener.reload();
window.self.close();
</script>