Pregunta

We are having a strange problem with Internet Explorer 8 and above.

Our Login process is handled using Javascript that posts hidden parameters being passed on to underlying servlet using AJAX call.

$j(document).ready(function() {
    console.log('loaded');
    $j(".show-login").click( function() {
        var id=this.id.split("_",1);
        $j(".options-drop-down").hide();
        $j(".all-options-buttons").removeClass("xyz-options-button-selected");
        $j(".all-options-buttons").addClass("xyz-options-button");
        $j("#"+id+"_login_options").show();
        $j("#"+this.id).removeClass("xyz-options-button");
        $j("#"+this.id).addClass("xyz-options-button-selected");
    }); 
});

Every subsequent login throws us out due to invalid login, the variables are correctly received in the servlet, but somehow session values are incorrect.

Code works in Firefox, Chrome and Safari.

¿Fue útil?

Solución

After trying a lot of approaches with observing random JSESSION id being generated, We tried cleaning IE cookies, IE History, IE temp files but did nothing to resolve it.

We observed that whenever we had Internet Explorer Developer Tools (F12) opened, the script worked fine.

Finally we tried removing the following line from the javascript

console.log('loaded');

and the script started working fine.

So to Summarize:

Calling any method on Console object interferes with normal Script execution when Internet Explorer Developer Tools is not running

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top