Hi All,

My parent window is dash.html. From this i call a pat.jsp file which is a child window to dash.html. I wrote a function in dash.html

function feed_refresh(){

        getGlaceCompleteDashBoardResult(1);
    }

this function getGlaceCompleteDashBoardResult(1); is included in a .js file in dash.html file.
Now from the pat.jsp i call the feed_refresh() function on onunload=db_refreshfeed(); like this.

 var db_refreshfeed = function(){
             if(REQUEST_TYPE)
             window.opener.feed_refresh();
         }

This code working nice in IE but in mozilla it throws uncaught exception.
Plz guide me wat to do.

Thanks in advance

Recommended Answers

All 3 Replies

This: onunload=db_refreshfeed[B]()[/B] should NOT have the parenthesis. You need to assign a function reference, NOT call the function since your function is NOT returning a function. Also try using onbeforeunload instead.

Lastly, be sure both pages are on the same domain.

I tried that too... But still its not working. I want to refresh the parent window if the child window closes thats why am using db_refreshfeed() in onunload.

try the following instead: on[B]before[/B]unload=db_refreshfeed;

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.