|
|
|
|
![]() ![]() |
| StonedDevil |
Mar 7 2005, 09:40 PM
Post
#1
|
|
Guests |
This code will allow people who use iframes to link to there page, then load the iframe so that they can give external links to people that will link directly to the iframe page they want to see.
now this first part has to be in the head of your document CODE <script type='text/javascript'> window.onload = function setIframe() { var url = window.location.href; var i = url.indexOf("?i="); if( i>-1 ) { url = url.substr(i+3); document.getElementById("body").src = url; } } now this is about how your iframe tag should look CODE <iframe src="home.html" WIDTH=505 HEIGHT=420 name="content" id="body"></iframe> of course replace the src/height/width/name with whatever you have in yours, the important part is "id=body" here is the way you should make your links CODE http://www.yourdomain.com?i=pagetoload.html to see this code in action, click this link http://www.stoneddevilinc.com?i=template_r...equest_form.php |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th October 2008 - 09:49 PM |