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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing data to an existing form

Status
Not open for further replies.

tbubbs

Programmer
Mar 30, 2001
26
CA
Hello,
Here is my problem. I have a pop up window that is used to select comments. Once a comment is selected I would like it to be placed in the comment area of the main page. The reason I have a pop up window, is because the user may want to expand on the existing comment. The problem I am having is that when I go to close the pop up window, it does not refresh the main page with the selected commment. Any suggestions? I have done this for other pages, but as I was closing those pages, I was submitting directly to the database, this time I just want to submit to the existing parent page.
Thanks,
T
 
You could also consider using the window.opener statement in Javascript to get a reference to the window object of the page that opened the pop-up. And from there you might be able to write the contents of the pop-up window to the main window without even refreshing.

Don't know if it's cross-browser compatible...

Jordi Reineman
 
If your users are all using IE5, you can open a modal dialog window and get whatever value(s) you want back from it.

Check out window.showModalDialog. Example in VBScript:

Code:
Dim vDialogArguments
Dim vReturnValue
	
vDialogArguments = window.frmMyForm.txtComments.value
vReturnValue = window.showModalDialog("PopUpComments.ASP", vDialogArguments, "dialogHeight:500px;dialogWidth:795px;center:yes;help:no;resizable:yes;status:no")
window.frmMyForm.txtComments.value = vReturnValue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top