Q

How do I get a Web form dropdown to refresh after a pop-up window is closed?

I have a Web form with a dropdown in which users choose their alias. This drop-down is linked to a SQL Server table. If the user doesn't have an alias, they can click a button and a pop-up window appears in which they add their name and alias. This pop-up updates the SQL Server table. How do I get the drop-down to refresh after they have closed the pop-up and returned to the main Web form?
You would have to reload the main page. This involves the following call in JavaScript from within your popup window, before closing it:

self.opener.location.reload();

Note that self.opener, window.opener, and simply opener point to the same object.

This was last published in September 2003

Dig Deeper on .NET tutorials, guides and quizzes

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close