|
Posted by Manfred Preuίig on 04/21/07 11:58
Hello, and thanks. I have some additional questions to it:
Toby A Inkster schrieb:
> Manfred PreuΓig wrote:
>
>> In 'C' this would be easy to do (just '#include <filename>' at the point
>> it is needed (it is recommended but not need to be at the file start))
>> but can I do it in HTML and if how?
>
> In pure HTML no, but there exist several different mechanisms for doing
> what you describe with server-side scripting languages. The simplest of
> these is languages is called "Server-Side Includes (SSI)" -- indeed, it is
> so basic that it can barely be called a scripting language. To include a
> file, you just use:
>
> <!--#include "filename.html"-->
This is to the html-file like a comment. Can I include it at every point
in the source? And what's about the result: It is like the code is in
the original file? What's about the code: Is this included file a
complete html-file (with html and body-tag and so on?)? And what's about
CSS? Where I have to set the outline? And the positions?
>
> Easy. However, you'll need to make sure that your server supports this
> feature. You don't need to worry about browser support for any particular
> server-side technology though -- just server support. As you appear to
> come from a C background, think of the server-side technology as being an
> odd compiler extension -- if you write code that uses the odd compiler
> extension, you only have to worry that your compiler supports the
> extension -- you don't need to worry if the people running the
> already-compiled program have a compiler that supports the extension.
>
> Better yet would be to learn PHP, which really is a full-blown programming
> language that can be embedded in web pages. Its syntax is much like C, but
> it's more abstract, so you don't need to worry about memory management and
> pointers and so on. Here's an example:
>
> <p class="sum">Here is a tricky sum:<br>
> <?php
> $i = 123;
> $j = 456;
> printf('%d + %d = %d', $i, $j, $i+$j);
> ?>
> </p>
>
> And here's how you include a file with PHP:
>
> <?php
> include "filename.html";
> ?>
>
Here are the questions the same as above.
The code I want to embed is the navigation bar of the page so the
contents have to make changes to the presentation. But the only change
is the change of the file in an iframe so possibly this can be shifted
to the embedded file to make it work.
So again many thanks for this allready here. I ask my provider for
features his site have. Wait and see what I can use there.
greetings
ManfredP
Navigation:
[Reply to this message]
|