Agustin
Agustin

Reputation: 69

sessionStorage not working

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 !...

Upvotes: 0

Views: 9513

Answers (1)

Jocelyn LECOMTE
Jocelyn LECOMTE

Reputation: 885

Works like a charm for me in firefox 11. Try this fiddle:
http://jsfiddle.net/maitrekaio/FLvtJ/

Upvotes: 1

Related Questions