sessionStorage not working
-
31-05-2021 - |
Question
My question is the following one... Considering the jQuery code of these two buttons...
$('#submit').bind('click',function(e){
var texto = $('#linkSelected').val();
alert(texto);
sessionStorage.setItem('nombre', texto);
});
$('#load').bind('click',function(e){
var val = sessionStorage.getItem('nombre');
alert(val);
});
it seems that when the first jquery click evento is executed, the sessionStorage object doesn't store my 'nombre' item... So... When I press the second button, I don't get raised the alert popup... Who knows the reason ?... I am programming in DreamWeaver CS5.5 and I am testing this in FireFox v11 !...
Solution
Works like a charm for me in firefox 11. Try this fiddle:
http://jsfiddle.net/maitrekaio/FLvtJ/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow