Ask the Expert

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 first published in September 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: