You are here: Re: HTML page loads external frame « HTML « IT news, forums, messages
Re: HTML page loads external frame

Posted by Jonathan N. Little on 06/20/06 19:16

Evertjan. wrote:
> David Dorward wrote on 20 jun 2006 in comp.lang.javascript:
>
>> Silver wrote:
>>
>>> Here is my question. I want that when someone types in the browser
>>> addressbar the address www.mysite.com/first.html, then instead of
>>> loading just the "first.htm" l file, I want to see the entire
>>> "index.html" page and the "first.html" file loaded inside the iFrame.
>>> Is it possible?
>> No
>>
>
> Yes [if the diference between .htm and .html is a typo]
>
>
> ============= in first.html =============
>
> <script type='text/javascript'>
> if (self == top) location.href='index.html?f=first.html'
> </script>
>
> ============= in index.html =============
>
> select the f=filename by location.hash and load the iframe.
>

Better to do it with server-side and not depend on JavaScript

index.php?f=first.html

It is one of the nasty bit with frames, (iframes included) and I guess
to prevent breaking out of frames a non-javascript solution would be a
rewrite in the .htacess file.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация