Bonjour les fous du code !
Ma base de données access 2003 est consultée sur internet. Un de ses champs contient des informations enregistrées à partir d'une Rich Text Box. Comment afficher le texte mis en forme (sans le code) ? Il ne s'agit que de consultation, pas d'écriture ou d'enregistrement d'informations nouvelles.
Pour info, je travaille sous Windows XP SP2 PRO avec IIS 5.1 installé. Je génère mes pages htm et asp avec FrontPage 2000. L'information RTB doit apparaître dans une des colonnes d'un tableau "résultat de base de données". Pour l'instant, ça marche mais sans la mise en forme et avec plein de codage zarbi intercalé ce qui rend le contenu incompréhensible.
Merci de votre aide,
Monbasinstinct
P.S. j'ai regardé le code de ma page asp. Le code du formulaire de recherche d'informations ressemble à ça (la partie qui concerne la colonne de résultat que je veux voir apparaître avec sa mise en forme est surlignée en bleu) :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| <form BOTID="1" METHOD="POST" ACTION="texteetresumes.asp">
<table BORDER="0">
<tr>
<td><b>Recherche par numéro : </b></td>
<td><input TYPE="TEXT" NAME="numero" VALUE="<%=Request("numero")%>" size="20">
<input TYPE="submit" value="Lancer la recherche !"> <input TYPE="reset" value="Tarer (nouvelle recherche)"></td>
</tr>
</table>
</form>
<table width="1114" border="1">
<thead>
<tr>
<td width="100"><b>Numéro</b></td>
<td width="998"><b>Extraits ou résumés</b></td>
</tr>
</thead>
<tbody>
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="cleprimaire,annee,numero,Deposants,Intitule,commentaireDEA"
s-columntypes="3,202,202,202,203,203" s-dataconnection="basounette"
b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue
b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE"
b-listlabels="TRUE" b-listseparator="TRUE" i-ListFormat="0"
b-makeform="TRUE" s-recordsource="commentairedea2"
s-displaycolumns="numero,commentaireDEA"
s-criteria="[numero] CNT {numero} +" s-order="[cleprimaire] +"
s-sql="SELECT * FROM commentairedea2 WHERE (numero LIKE '%::numero::%') ORDER BY cleprimaire ASC"
b-procedure="FALSE" clientside SuggestedExt="asp"
s-DefaultFields="numero=s.n."
s-NoRecordsFound="Désolé, votre recherche n'a rien donné."
i-MaxRecords="256" i-GroupSize="5" BOTID="1" u-dblib="_fpclass/fpdblib.inc"
u-dbrgn1="_fpclass/fpdbrgn1.inc" u-dbrgn2="_fpclass/fpdbrgn2.inc"
tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">Database Results regions will not preview unless this page is fetched from a Web server with a web browser. The following table row will repeat once for every record returned by the query.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.</font></td></tr>" --><!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM commentairedea2 WHERE (numero LIKE '%::numero::%') ORDER BY cleprimaire ASC"
fp_sDefault="numero=s.n."
fp_sNoRecords="<tr><td colspan=2 align=left width=""100%"">Désolé, votre recherche n'a rien donné.</td></tr>"
fp_sDataConn="basounette"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=1
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" I-CheckSum="43890" endspan -->
<tr>
<td width="100"><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="cleprimaire,annee,numero,Deposants,Intitule,commentaireDEA"
s-column="numero" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font size="-1">&lt;&lt;</font>numero<font size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</font>numero<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"numero")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="18972" endspan -->
</td>
<td width="998"><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="cleprimaire,annee,numero,Deposants,Intitule,commentaireDEA"
s-column="commentaireDEA" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1">&lt;&lt;</font>commentaireDEA<font size="-1">&gt;&gt;</font>"
preview="<font size="-1">&lt;&lt;</font>commentaireDEA<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"commentaireDEA")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="44761" endspan --></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="_fpclass/fpdbrgn2.inc" i-groupsize="5"
clientside tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=64><FORM><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR></FORM></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE=" < "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| "> [1/5]</NOBR><BR></td></tr>" --><!--#include file="_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" I-CheckSum="62730" endspan -->
</tbody>
</table>
</body>
</html> |
Le code d'une Rich Text Box incluse dans une page HTML, c'est :
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| <object classid="clsid:3B7C8860-D78F-101B-B9B5-04021C009402" id="RichTextBox1" width="100" height="50">
<param name="_ExtentX" value="2117">
<param name="_ExtentY" value="1058">
<param name="_Version" value="393217">
<param name="BackColor" value="-2147483643">
<param name="BorderStyle" value="1">
<param name="Enabled" value="1">
<param name="HideSelection" value="-1">
<param name="MultiLine" value="-1">
<param name="ReadOnly" value="0">
<param name="ScrollBars" value="0">
<param name="MousePointer" value="0">
<param name="DisableNoScroll" value="0">
<param name="MaxLength" value="0">
<param name="BulletIndent" value="0">
<param name="Appearance" value="1">
<param name="RightMargin" value="0">
<param name="AutoVerbMenu" value="0">
<param name="OLEDragMode" value="1">
<param name="OLEDropMode" value="2">
<param name="TextRTF" value="{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
\viewkind4\uc1\pard\lang1036\f0\fs24 RichTextBox1
\par }
">
</object> |
Mais je ne sais pas comment faire avec tous ça !