Jump to content

Recommended Posts

Posted

This might be an easy one, but for some reason I can't figure out how to do it. :rolleyes:

 

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?

Posted

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.

Posted
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.

Posted (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 by jhollin1138

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...