|
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]
|