Salve ragazzi so come funzionano i forum ma questa volta chiedo scusa se sbaglio il posto docve postare questa mia richiesta di aiuto.
Devo consegnare un sito luned' mattina e oggi provando la mia poagina appuntamenti ho scoperto che quando scrivo l'appuntamento ed uso caratteri speciali come :
'
e quando clicco su enter per andare a capo la pagina che visualizza la news mi da caratteri strani.
Per quanto riguarda ' mi da ′
Invece quando premo enter per andare a capo mi riporta
Come faccio a risolvere questo problema????
Vi allego i codici delle pagini che uso.
PREMESSA(Uso un database fatto in Access)
-Aggiungi_news.asp
<html>
<head>
<title>GESTIONE NEWS</title>
</head>
<body>
<font face="Verdana" size="4">> Aggiungi News</font></p>
<form method="POST" action="News_DB.asp?tipo=aggiungi">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="19%"><font face="Verdana" size="2">Titolo news:</font></td>
<td width="81%"><font face="Verdana" size="2"><input type="text" name="titolo" size="20"></font></td>
</tr>
<tr>
<td width="19%"><font face="Verdana" size="2">Contenuto news:</font></td>
<td width="81%"><textarea rows="7" name="contenuto" cols="53"></textarea></td>
</tr>
<tr>
<td width="19%"><font face="Verdana" size="2">Autore news:</font></td>
<td width="81%"><font face="Verdana" size="2"><input type="text" name="autore" size="20"></font></td>
</tr>
<tr>
<td width="100%" colspan="2"><font face="Verdana" size="2"><input type="submit" value="Aggiungi news" name="B1"><input type="reset" value="Reimposta" name="B2"></font></td>
</tr>
</table>
</form>
<a href="Gestione_news.asp"><font face="Verdana" size="2">Torna alla
Gestione delle news</font></a></p>
</body>
</html>
------------------------
-Modifica_news.asp
<html>
<head>
<title>GESTIONE NEWS</title>
</head>
<body>
<%
' PERCORSO DEL DATABASE
url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("/mdb-database/database.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Open url_DB
Set RecSet = Server.CreateObject("ADODB.Recordset")
' PRELEVA I DATI DELLA NEWS SELEZIONATA
SQL = "SELECT * FROM NEWS WHERE ID = " & Request.QueryString("id") &""
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
' PASSA ALLA PAGINA "NEWS_DB.ASP" INOLTRE L'ID DELLA NEWS SELEZIONATA
%>
<font face="Verdana" size="4">> Modifica News</font></p>
<form method="POST" action="News_DB.asp?tipo=modifica&id=<%=RecSet("id ")%>">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="19%"><font face="Verdana" size="2">Titolo news:</font></td>
<td width="81%"><font face="Verdana" size="2"><input type="text" name="titolo" size="20" value="<%=RecSet("titolo")%>">
- <%=RecSet("data")%></font></td>
</tr>
<tr>
<td width="19%"><font face="Verdana" size="2">Contenuto news:</font></td>
<td width="81%"><textarea rows="7" name="contenuto" cols="53"><%=Replace(RecSet("contenuto"), "
", chr(13))%></textarea></td>
</tr>
<tr>
<td width="19%"><font face="Verdana" size="2">Autore news:</font></td>
<td width="81%"><font face="Verdana" size="2"><input type="text" name="autore" size="20" value="<%=RecSet("autore")%>"></font></td>
</tr>
<tr>
<td width="100%" colspan="2"><font face="Verdana" size="2"><input type="submit" value="Modifica news" name="B1"><input type="reset" value="Reimposta" name="B2"></font></td>
</tr>
</table>
</form>
<a href="Gestione_news.asp"><font face="Verdana" size="2">Torna alla
Gestione delle news</font></a></p>
</body>
</html>
----------------------
-Leggi_news.asp
<html>
<head>
<title>NEWS</title>
<script LANGUAGE="JavaScript">
function click() {
if (event.button==2) {
alert('attenzione');
}
}
document.onmousedown=click
</script>
</head>
<body background="IMG/sfondo_barre.gif">
<%
' RICHIEDE L'ID
ID = Request("ID")
' SE NON E' STATO PASSATO UN VALORE VALIDO
' COME ID, IMPOSTA QUESTO AD UNO
If not ISNumeric(ID) or Len(ID) = 0 Then
ID = 1
End IF
' SE L'ID E' UGUALE A ZERO
' LO IMPOSTA UGUALE A UNO
IF ID = 0 Then
ID = 1
End IF
' PERCORSO DEL DATABASE
url_DB = "driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("/mdb-database/database.mdb")
Set Conn = Server.CreateObject("ADODB.Connection")
conn.Open url_DB
Set RecSet = Server.CreateObject("ADODB.Recordset")
' PRELEVA LA NEWS DAL DB, IN BASE ALL'ID PASSATO
SQL = "SELECT * FROM NEWS WHERE ID = " & ID &""
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
' CONTROLLA SE LA NEWS E' REALMENTE PRESENTE
If RecSet.Eof = False Then
' VISUALIZZA LA NEWS, PRELEVANDO DAL DB I VARI CONTENUTI (TITOLO, DATA, AUTORE, ECC...):
%>
<table width="80%" border="3" align="center" bordercolordark="#ffffff" bordercolor="#FFffff" bordercolorlight="#FFffff" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#666666">
<CENTER> <FONT face="Times New Roman, Times, serif" color="#ffffff" SIZE="4">Descrizione Appuntamento</FONT>
</CENTER>
</td>
</tr>
<tr>
<td bgcolor="#e5e5e5">
<UL>
<font face="Arial" size="4"></font><font face="Arial" size="4" color="#666666">
<%=RecSet("titolo")%> </font>
</p>
<font face="Times New Roman, Times, serif"size="3" color="#000000"><%=RecSet("contenuto")%></font></p>
</p>
[/list]
</td>
</tr>
</table>
<%
End IF
RecSet.Close
Conn.Close
Set Conn = Nothing
Set RecSet = Nothing
%>
</body>
</html>
---------------------
PS.
Ho provato anche mettendo charset nell'head ma non risolvo nulla anzi mi impazzisce anche se uso àèìòù
Aiutatemi vi prego...non sono mai stato così disperato!

Rispondi quotando