Hi All,

I have a function reloaddash(1); for refresh the db.js in db.js file which sends a ajax request to the action file.

In this .js itself I draw the table,td,tr for display. I dont use seperate .jsp file to draw. By onclick a link in this js file I opened a new window using window.open(URL).

Now my confusion is If I close this new window I need to refresh this .js file that is i need to call the function reloaddash(1); But I dont know how to call this function on the closing of new window.

Is there any option to call a function from w.indow.close or parent.opener. I tried a lot.

Plz suggest. Thanks in Advance

<a href="javascript:window.opener.location.reload();window.close()">Close</a>

It will create a close button in the child window.
May this work for you.

Hi All

One thing i forgot to mention the new window is a .jsp file which i am passing in the window.open(URL). In the new window itself i have close image. But when I close the new window I need to call the refreshdash(1); function in the same js

thanks in advance

call parent refresh before closing child window like:

window.opener.refreshdash(1);

or something like

window.opener.document.location.href = window.opener.document.URL;
window.close();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.