jhollin1138 Posted October 12, 2006 Posted October 12, 2006 This might be an easy one, but for some reason I can't figure out how to do it. I am developing a web based application in PHP and MySQL. On one of the pages I want to have an iframe to display some information in a grid. I need to be able give the user the ability to add and change information displayed in the iframe by utilizing a pop-up window (I will be using Java of course to handle the pop-up). When the user closes the pop-up window, I need to refresh the iframe to display the changes. How do I get the iframe to refresh when the pop-up window is closed? On a side note, is there anyway to force the pop-up window to be always on top of the parent window similar to the way a Java alert is? Quote
jhollin1138 Posted October 12, 2006 Author Posted October 12, 2006 I figured out how to refresh an iframe when you close a pop-up window. I know it was easy, just had to stop and think about it. I just had to put the following in the pop-up window. ><form> <input type="button" onClick="opener.location.reload(); self.close()" value="Close"> </form> Now if I can only figure how to keep the pop-up always on top. Quote
jhollin1138 Posted October 12, 2006 Author Posted October 12, 2006 I wonder if <body onblur="self.focus();"> will work I just tried this and was going to post something to find some one already posted something. It seems to work with IE fine. With Firefox, it only works the first time you try to change windows. After that, it doesn't work. Quote
jhollin1138 Posted October 12, 2006 Author Posted October 12, 2006 (edited) I found another problem with ><body onblur="self.focus();"> If you have a form in the pop-up window, you can't change anything. It looks like I found a solution that should work with both IE and Firefox. I found it here. I still have to try everything out on my application, but judging from the examples on the page it should work. Edited October 12, 2006 by jhollin1138 Quote
TCH-JimE Posted October 16, 2006 Posted October 16, 2006 Hmmm, I would look at doing this via AJAX possibably? E.g. try editing your own post using the quick edit method. This is essientially what your trying to do. JimE Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.