Reputation: 957
I have one textbox and one textarea. I want to save the text whatever I entered in that textbox but that textbox is in Iframe.
How I do it using jquery or javascript?
Please help me.
Upvotes: 0
Views: 2020
Reputation: 82594
window.localStorage is another option working on IE8+, modern browsers without the 4K ceiling:
localStorage['textareaKey'] = $('#textarea').val();
$('#textarea').val(localStorage['textareakey']);
Upvotes: 1
Reputation: 30105
Use jQuery.cookie
plugin to work with cookies.
$("#myframe").contents().find('#textboxid').blur(function() {
$.cookie('textboxvalue', $(this).val()); // for storing
});
Where myframe
id of the frame and textboxid
id of the textbox inside of iframe.
Upvotes: 2