Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-12-2014, 03:13 PM #1
- Join Date
- Feb 2014
- Thanked 0 Times in 0 Posts
Use div as iframe and add 'loading' message
I'm creating a simle 'link collection' tool to use at work.
The functionality right now is very basic. When first entering the side, theres a list of links and a dashboard. When clicking one of the links, they open in the iframe that the dashboard is in.
Because of compatibility reasons, I wan't to use a div instead of an iframe to open the dashboard and links in.
So instead of:
<a href="somelink.php" target="content">Link 1 </a> <iframe id="contet" src="dashboard.php"></iframe>
02-15-2014, 03:01 AM #2
- Join Date
- Mar 2006
- Splendora, Texas, United States of America
- Thanked 301 Times in 295 Posts
XMLHttpRequestobject to request the file from the server, copy portions of the document, and insert them into your page. For security reasons, you'll need to have permissions from the server owning the page you're copying from if it isn't located on the same domain.
XMLHttpRequestis complicated though; unless your "compatibility reasons" are compelling, I would recommend sticking with simple iframes or, better, eliminating iframes entirely by using server-side code inclusions.For every complex problem, there is an answer that is clear, simple, and wrong.