|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Inserting a html page withing a html page
What's the best way to do this please? I simply can't remember what language would take the content from one page and insert it where you would like in another.
I basically want to have a constant menu displayed without using frames, so a html page (or however it's done) would contain just the menu, and all the other pages would call it and show it on the left/right/whatever. Cheers. |
|
#2
|
|||
|
|||
|
Which language?
- any. Client side: JavaScript example: <script ...> document.write('<a href="menu1.html">menu1</a>'); ... </script> PHP example: <? include "file.html" ?> ... I am too lazy to thing of all the 100s of others.... IMO it only depends on what your provider allows you to do and your skills. hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
||||
|
||||
|
Excellent. Cheers.
|
|
#4
|
||||
|
||||
|
You can use DHTML for that matter:
Code:
<object type="text/x-scriptlet" width=100% height="250" data="data.htm"> </object> |
|
#5
|
||||
|
||||
|
Quote:
Not to pick nits, but that isn't DHTML, its just plain HTML.
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
|
#6
|
|||
|
|||
|
And scriptlets is afaik a microsoft-only feature...
Great idea... he doesn't want frames, you are suggesting an object instead. ![]() M. |
|
#7
|
||||
|
||||
|
<!--#include file="menu.html" -->
rock on!! ![]() |
|
#8
|
|||
|
|||
|
I do that using SSI.
I have the same requirement of keeping common stuff in one file and include it in all htmls. So, I do something like: <!--#include virtual="include.html" --> However, I had to rename my html to .shtml extension for my webserver to parse it well, though. |
|
#9
|
|||
|
|||
|
An <Iframe> works very well also. And is very easy to implement.
|
|
#10
|
||||
|
||||
|
Quote:
... Quote:
And FYI: <iframe> is the same as <object> which was suggested earlier (although with a wrong mimetype). M. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Inserting a html page withing a html page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|