hi all,
i have a requirement in which i want to use click event to set some value into a jsp session object.
now from what i have tested, this seems to be logically very wrong, but the fact is that i want this thing to work somehow as there are no alternative for me in this case.
here is the code which i am trying.
$(document).ready( function() {
var key = 'false'; // initial value
$("#logimage").click( function() {
if(key=='true' )
{
$("#loginimage").attr('src', 'images/key.png'); // changing the icon
<%session.setAttribute( "useractive", "false" ); %> // putting current selection in session
key=false;
return false;
}
if(key=='false')
{
$("#loginimage").attr('src', 'images/activatekey.jpg'); // changing the icon
<%session.setAttribute( "useractive", "true" ); %> // putting current selection in session
key=true;
return false;
}
});
i know that this question might come into the category of absurd questions, but can anyone point out some logic for something similar, i have a jsp page and i want to set these values in the session based on the button click.