Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
92
rated 0 times [  95] [ 3]  / answers: 1 / hits: 20278  / 13 Years ago, sun, september 25, 2011, 12:00:00

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?)


More From » facebook

 Answers
29

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?


[#89943] Thursday, September 22, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mckinleykeyshawnb

Total Points: 281
Total Questions: 99
Total Answers: 111

Location: Saudi Arabia
Member since Sat, Aug 20, 2022
2 Years ago
;