|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Assume I have a HTML web page with a pre-defined <div> ...</div> area.
When the users clicks now on a certain link on this web page (outside or inside this "div" area) then the content of a file say "first.html" (currently still on the server) should be loaded and filled into the existing <div>...</div> area in the current Web page and displayed. How can I do this in detail? Pat |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
patmin@hotmail.com (Patricia Mindanao) writes:
> Assume I have a HTML web page with a pre-defined <div> ...</div> area. > > When the users clicks now on a certain link on this web page > (outside or inside this "div" area) then the content of a file say > "first.html" (currently still on the server) should be loaded and > filled into the existing <div>...</div> area in the current Web page > and displayed. You can't do this without using some sort of server-side support. That probably makes it off-topic here but I am not sure where this sort of question belongs. First, if you succeed (and it can be done) you will run into other problems since a full HTML page is not permitted inside a DIV (see the other recent thread on that topic). It is best if the "injected" material is a fragment -- specifically only those things that are valid inside a DIV. Second, you need to use some form of server-side include, together with some mechanism that identifies what page is to be inserted (if it always "first.html" then I would just have two static pages one with an one with out the included text). You could specify the page in the URL like this: <a href="outline.html?page=first.html"> whilst inside the <div>...</div> one could have a small piece of PHP that includes the specified file (usually after checking the value to prevent malicious uses). > How can I do this in detail? I'll leave it at the level of detail in case you were hoping for an HTML-only solution. -- Ben. |
|
![]() |
| Outils de la discussion | |
|
|