PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > How to load first.html into a certain <div>...</div> area?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to load first.html into a certain <div>...</div> area?

Réponse
 
LinkBack Outils de la discussion
Vieux 20/11/2008, 19h47   #1
Patricia Mindanao
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to load first.html into a certain <div>...</div> area?

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
  Réponse avec citation
Vieux 24/11/2008, 00h02   #2
Ben Bacarisse
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to load first.html into a certain <div>...</div> area?

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.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h56.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07322 seconds with 10 queries