You need to sign in to do that
Don't have an account?

logout issue
Hi
We have implemented logout functioanlity by adding script "/secur/logout.jsp" to visualforce page for force.com sites. But whenever we logout, it is going to Sales force logout page and then going to login page. As per requirement we dont want to show sales force logout page. please let me is there any java script or other scipt to change the behavior.
Thanks,
Ravikumar Katragunta
I guess you are challenging native behavior of salesforce.
Hi Ravi,
All you have to do is, use "your required url" instead of "/secur/logout.jsp" in your visualforce page in your logout paramater. Let me know if this is what you are looking for?
Thanks.
Go to partner settings and set logout url there.
I had the same problem but wasn't worried about it too much. I couldn't find anything settings within SFDC that would prevent that intermittent page so I wrote some javascript to do it. It's a little clunky, but it will solve your immediate problem.
Replace the logout link you are using now with the a href tag. When a user clicks logout, a window will popup real quick then disappear and then they will be redirected to whatever URL you set in the location.href.
I think a hidden iframe on another page would probably be better than the pop-up but this does work.
<script type="text/javascript">
function logout()
{
popup = window.open("{!$Site.Prefix}/secur/logout.jsp", "popup", "status=1,width=0,height=0");
popup.close();
window.location.href="http://www.yoursite.com/"
}
</script>
<body>
<a href="" onclick="return logout()">Logout</a>
</body>
Steve Wasula
Found a better solution...
<apex:page showheader="false">
<head>
<meta http-equiv="Refresh" content="1, URL=http://www.yoursite.com" />
</head>
<body>
<iframe src="{!$Site.Prefix}/secur/logout.jsp" width="100%" height="0"></iframe>
Logging Out ....
</body>
</apex:page>
The logout page will display for 1 second and then redirect the logged out user to whatever page you want. It also doesn't require javascript.
Hope this helps,
Steve
its solves the issue.. thanks
<meta http-equiv="Refresh" content="1, URL=http://www.yoursite.com" />
Above line is not working in Internet Explorer, Below Line is the FIX for all browsers :
Satya
please let me know where and how i can override the /secur/logout.jsp. As far as I know, we dont have default site.logout() method provided by salesforce.
I am trying to override the logout functionality for standard salesforce and not for any curstomer portal. Please assist urgently.