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

Reload and popup focus not working.

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
0
0
US
I've read and unsuccesfully tried the suggestions already posted in this forum. I have two forms. The parent form opens a popup. The popup inserts a record into my database. I need the parent form to reload (in order to show this newly inserted record) AND place the focus BACK to the child/popup.

Here is my code from the popup/child page. This is called from an onload event in my body tag:

function ReloadParentForm(){
if (window.opener.location.href.indexOf == -1)
{var str=window.opener.location.href + &quot;?varone=<cfoutput>#varone#</cfoutput>&function=<cfoutput>url.function</cfoutput&quot;;}
else
{var str=window.opener.location.href + &quot;&chkSelection=FormName&quot;;}
window.opener.location.href = str;
opener.location.reload(false);
self.focus;}

From the parent page, I call or open my popup with this:
<a href=&quot;form.cfm?varone=#varone#&vartwo=#vartwo#&quot; onclick=&quot;NewWindow(this.href,'name','800','600','yes');return false;&quot;>Select</a>

Any suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top