Question

I developed a single page website (like windows 8 tiles) and i put my aspx pages in iframe when i click a tile in default page it opens the related iframe in same default page. Its all working fine.

Here the problem is when default page is loading all the iframe aspx pages are loading it is unwanted and there it takes lot of time to load all the pages, it is not necessary to load the pages when i click the tile then the related iframe page will open.

How did i prevent this loading aspx pages ?

Était-ce utile?

La solution

A possible way around this would be to leave the src attribute of each iframe empty and use javascript to change it on click. For example, you could create an iframe like

<iframe id="ifrm" src=""></iframe>

and add to the tiles an onclick event with the following javascript:

document.getElementById['ifrm'].src = "http://www.test.com";
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top