Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repopulate cfselect after returning from 2nd window

Status
Not open for further replies.

MarkLA

Programmer
Joined
Aug 31, 2001
Messages
1
Location
US

I am a new user to ColdFusion and am having a problem with
a cfselect. I have created a cfselect statement where a
person can select the physician that they are using. If
their physician is not in the list, I have a seperate button
(created with an input) that allows them to add their
physician to the database. The button will open a new
window with the necessary fields to add a physician. After
the physician has been added, I send them back to the
original window. The problem that I have is that the newly
added physician does not show up in my select list. I need
to be able to repopulate the select list after returning
from the add physician window.

Any help that can be provided will be greatly appreciated.

Thanks,

Mark
 
i would reload the page = re run the query = re populate the select box
 
Try something like this in the popup window:

<script language=&quot;javascript&quot;>
function reloadParent() {
window.parent.location.href = 'yourfile.cfm';
}
</script>

<form...>
...
<input type=&quot;foo&quot; onclick=&quot;reloadParent();&quot;>
...
</form>

I'm fairly sure it's something like window.parent... or something, you may have to check the javascript docs. __________________________________
&quot;This is our Stretchy-Relativistic-Ruler -- it allows us to read a moving measurement from a fixed point accurately during space contraction... How fast can you run down the hall?&quot; -- Overheard Physics Professor at the University of Oregon
 
in the head of the window you want to refresh, make sure that you have named it, using:

<script>
window.name = &quot;mainWindow&quot;
</script>

in the new window you can use this to refresh parent and self close the new one; put the code just after the cf procedure that should be executed:

<script>
window.opener.refresh();
self.close()
</script>
Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Almost all problems with CF and refreshing can be resolved by using <CFLOCATION>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top