1

I am using the facebook dialog feed to allow the user to post a message to their wall.

You must provide a redirect_url for the page to redirect to after it has submitted, I want on the page it redirects to to have some code which simply closes the windows.

I tried using

<html><head><title>Close</title></head><body onload="window.close();"></body></html>
and
<html><head><title>Close</title></head><body onload="self.close();"></body></html>

but to no effect.

(note that my testing is simply me opening a new tab with this url, could that be the issue?)

Hailwood
  • 89,623
  • 107
  • 270
  • 423

1 Answers1

8

You can only close windows with javascript if they were opened with javascript.

Otherwise, try looking at this question: How can I close a browser window without receiving the "Do you want to close this window" prompt?

Community
  • 1
  • 1
Rusty Fausak
  • 7,355
  • 1
  • 27
  • 38