Andrey Savitsky
Posts: 0
Joined: Sun May 19, 2013 3:53 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hello.
In component html code there:
!DOCTYPE html
html
head
title
function on_iframe_load() {
document.getElementById('iframe_a').onload = function() {
};
}
/script
/head
body
iframe name="iframe_a" id="iframe_a"
a href="http://gomel-transport.by/node/105" target="iframe_a" onclick="on_iframe_load()"Go!
/body
/html

How to save the contents of the iframe in the cache or local storage?
Help me, please.

Andrey Savitsky
Posts: 0
Joined: Sun May 19, 2013 3:53 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

I want to save the contents of the iframe in the cache.

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hello,

You should follow the link above and act as it's stated there. What is the problem?

Andrey Savitsky
Posts: 0
Joined: Sun May 19, 2013 3:53 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hello.

I got the contents of the iframe.

I do not understand, how to save the contents in the cache?

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hi,

Then you should save values in localStarage, it will be easier. Get value from iframe and save it in localStorage:
var value = $("#id_description_iframe").contents().find("body").html();
localStorage.setItem("myFrame", value);

Andrey Savitsky
Posts: 0
Joined: Sun May 19, 2013 3:53 pm

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hello, Nikita.
Thanks you.
Where to put this code?
How to get the contents of a iframe from the local storage?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to save the contents of the iframe in the cache or local storage? Help me, please.

Hello!

[quote:]Where to put this code? [/quote]it depends on your app logic. You can run this code om button click.
[quote:]How to get the contents of a iframe from the local storage? [/quote]read mor eabout localStorage here https://developer.mozilla.org/en-US/d...

Return to “Issues”