Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-04-2013, 06:02 AM   PM User | #1
xaja-newBie
New to the CF scene

 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
xaja-newBie is an unknown quantity at this point
Ajax issue in WebSphere+firefox-- Please help!!

Hi,

i am trying to clear the user authentication cache with the below code for IE and FireFox browser.. it works well when deployed in my local environment(win7, IE8,FireFox19.0,tomcat 4.1.36) in tomcat server. but it is not working in Firefox after deploying in (Unix, WebSphere6.1,Firefox19.0). can somebody help me what could be wrong??

my first approach::
<code>
function clearCache(){
var ua= window.navigator.userAgent;
if(ua.indexOf("MSIE") > 0){
document.execCommand("ClearAuthenticationCache");
return true;
}else{
$.ajax({
url: '<%=request.getContextPath()%>/pages/PeleLogout.jsp',
username: ' ',
password: ' ',
statusCode: { 401: function() { //alert('Logged Out')
}
}
});
return true;
}
}
</code>

my second approach ::
<code>
function clearCache(){
alert(" in clearCache");
if(window.navigator.userAgent.indexOf("MSIE")>0){
alert(" is IE Browser");
document.execCommand("ClearAuthenticationCache");
}else{
alert(" is not an IE Browser");
var xmlhttp=createXMLObject();

xmlhttp.open("GET","URL",true,"logout","logout");
xmlhttp.send("");
xmlhttp.abort();
}
}

function createXMLObject(){
try
{
if(window.XMLHttpRequest){xmlhttp= new XMLHttpRequest();}
else if (window.ActiveXObject){xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");}

}catch(e){

xmlttp=false

}
return xmlhttp;

}
</code>

both first approach and second approach works well in my local tomcat server, but after deploying into websphere6.1 server both the versions fail to work in firefox, any help in this regard is highly appreciated

Regards,
axaj-newBie
xaja-newBie is offline   Reply With Quote
Reply

Bookmarks

Tags
basic authentication, clear cache, firefox, logout, websphere

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:38 PM.


Advertisement
Log in to turn off these ads.