GeeCON Prague 2014*
The moose likes JSP and the fly likes updated data from child, refresh parent ,how to? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "updated data from child, refresh parent ,how to?" Watch "updated data from child, refresh parent ,how to?" New topic
Author

updated data from child, refresh parent ,how to?

majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
Hi,

I have two pages : parent.jsp and child.jsp



when I open parent.jsp it will populated from a database,whe I click the link update,the child.jsp popup and whatever change I do and I click ok , data will change in the database and the parent.jsp will refresh for new changed data from database.





Any idea on how to do this.



thanks.
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
I will suggest a slight variation in the page design. You can have an update link on your parent.jsp page. Use Ajax to dynamically update the parent.jsp page to show the form you would otherwise hold in your child.jsp when the user clicks the link. When user submits this form, again hide the embedded form. You will find plenty of websites on the internet following a similar approach.


Nilesh Miskin
majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
It's a good idea, but I don't have any experiences in Ajax, please if you have an example or you know any link like that post it here,

thanks,your help is appreciated.
Nilesh Miskin
Ranch Hand

Joined: Jun 17, 2010
Posts: 44
You can start from this tutorial on AJAX.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: updated data from child, refresh parent ,how to?