Update window behind lightbox.js window when lightbox.js window is closed

On my site I am using lightbox.js to open other urls on my site in a window above where the url is linked. The user enters in data, clicks a asp.net button, the data is updated and the window closes. Is there anyway to update the page that the lightbox window was opened on top of from the lightbox window?

Who is Participating?
tiagosalgadoConnect With a Mentor Commented:

ClientScript.RegisterClientScriptBlock(this.GetType(),"script","window.opener.document.forms[0].submit();", true);
Use the window.parent.refresh();
addicktzAuthor Commented:
Where would I put that at?

I tried using the following line of code at the end of the button click event from the child page and it didnt refresh the parent page, any ideas?

ClientScript.RegisterStartupScript(GetType(),"script","window.parent.refresh();", true);
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

addicktzAuthor Commented:
that didn't work ethier, any other ideas?
Hum, very strange.

Try this instead

I assume that you're executing all code i gave before you send the close window command.

addicktzAuthor Commented:
I commented out the close window line and tried the different lines you gave me, the window doesn't close and the parent window does not update, any ideas?
addicktzAuthor Commented:
ok, I got it, thank you for your help! =]

I put this on the child page head

 <script type="text/javascript">
 function showMessage(pstrMessage)
    self.parent.document.forms[0].submit();self.parent.myLytebox.end(); return false;

and on the child page submit postback i put

Page.ClientScript.RegisterStartupScript(GetType(), "script", "showMessage('Hello');", true);
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.