Newsgroup: it.comp.www.asp
Titolo: dove sbaglio?

ciao a tutti ho fatto il seguente script ma mi da errore (escludo errori di
connessione o campi sbagliati)
in particolare mi dice:
riga 7 errore previsto ')'
riga 21 errore previsto ')'
il mio codice:
<html>
<head>
<title>Trova Quotazione Titolo</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
Set objCon=Server.CreateObject("ADODB.Connection")
objCon.Open "DSN=eurosim"
Set objCmd=Server.CreateObject("ADODB.Command")
Set objCmd.ActiveConnection = objCon
Set objRec=Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM Tb_quotazioniFondi WHERE Nome='Fondeuro Azioni
Italia';"
objRec.Open sql, objCon
%>
<%
Response.Write "<script>var nomFondo = '" & objRec("Nome") & "';"
Response.Write "var prezzoFondo = '" & objRec("Prezzo") & "';"
Response.Write "</script>"
%>
<%
Response.Write "<script>var p=(parseFloat("& objRec("Prezzo") &"*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152;"
   Response.Write "var pTit=" & objRec("Prezzo") & ";"
Response.Write "var p1= parseFloat(" & objRec("Prezzo di collocamento") &
"*9) +152;"
   Response.Write "var p1Tit=" & objRec("Prezzo di collocamento") & ";"
Response.Write "var p2 =(parseFloat(" & objRec("Prezzo1995") & "*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152 ;"
   Response.Write "var p2Tit="& objRec("Prezzo1995")&";"
 Response.Write "var p3 =(parseFloat(" & objRec("Prezzo1996") & "*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152 ;"
   Response.Write "var p3Tit=" & objRec("Prezzo1996") & ";"
 Response.Write "var p4 =(parseFloat(" & objRec("Prezzo1997") & "*9)-
(parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152;"
   Response.Write "var p4Tit=" & objRec("Prezzo1997") & ";"
 Response.Write "var p5 =(parseFloat(" & objRec("Prezzo1998") & "*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152;"
   Response.Write "var p5Tit=" & objRec("Prezzo1998") & ";"
 Response.Write "var p6 =(parseFloat(" & objRec("Prezzo1999") & "*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152;"
   Response.Write "var p6Tit=" & objRec("Prezzo1999") & ";"
 Response.Write "var p7 =(parseFloat(" & objRec("Prezzo2000") & "*9)-
parseFloat(" & objRec("Prezzo di collocamento") & ")*9) +152;"
   Response.Write "var p7Tit=" & objRec("Prezzo2000") & ";"
 Response.Write "alert('p1='+p1+' p2='+p2+' p3='+p3+' p4='+p4+' p5='+p5+'
p6='+p6+' p7='+p7+' p='+p);"
Response.Write "var v1 = (p2Tit/(p1Tit/100))-100; "
Response.Write "if (v1 >0){v1 ='+'+v1+' '} else {v1 =' '+v1+' '};v1 =
v1.slice(0,6);"
Response.Write "var v2 = (p3Tit/(p2Tit/100))-100; "
Response.Write "if (v2 >0){v2 ='+'+v2+' '} else {v2 =' '+v2+' '};v2 =
v2.slice(0,6);"
Response.Write "var v3 = (p4Tit/(p3Tit/100))-100; "
Response.Write "if (v3 >0){v3 ='+'+v3+' '} else {v3 =' '+v3+' '};v3 =
v3.slice(0,6);"
Response.Write "var v4 = (p5Tit/(p4Tit/100))-100; "
Response.Write "if (v4 >0){v4 ='+'+v4+' '} else {v4 =' '+v4+' '};v4 =
v4.slice(0,6);"
Response.Write "var v5 = (p6Tit/(p5Tit/100))-100; "
Response.Write "if (v5 >0){v5 ='+'+v5+' '} else {v5 =' '+v5+' '};v5 =
v5.slice(0,6);"
Response.Write "var v6 = (p7Tit/(p6Tit/100))-100; "
Response.Write "if (v6 >0){v6 ='+'+v6+' '} else {v6 =' '+v6+' '};v6 =
v6.slice(0,6);"
Response.Write "var v = (pTit/(p7Tit/100))-100; "
Response.Write "if (v >0){v ='+'+v+' '} else {v =' '+v+' '};v =
v.slice(0,6);"
Response.Write "</script>"
%>
<script>
  document.write("<center><b><font color=blue size=5>" +  "Fondo: " +
"</font></b>" + "<b><font color=red size=4>" + nomFondo +
"</font></b><br><br></center>");
  document.write("<center><table width='400' border='0' cellpadding='0'
cellspacing='0' bgcolor='#FFFFFF'");
  document.write("bordercolor='#000000' height='319'><tr>");
  document.write("<td height='17' valign='middle' align='left' colspan='9'
bgcolor='#000000'>");
  document.write("<font color='#000000'>_</font> </font>");
  document.write("<font size=2 face='Arial, Helvetica, sans-serif'
color='#FFFFFF'>");
  document.write(" Fondo: <b>" + nomFondo + "</b> + "</b>&nbsp;&nbsp;Euro:
<b>"+ prezzoFondo +"</b></font></td>");
  document.write("<td valign=middle align=right bgcolor='#000000'><font
size=2 color='#ffffff'>"+ " " +"</font></td>");
  document.write("</tr>");
  document.write("<tr><td height='250' valign='middle' align='center'
bgcolor='#FFFFFF' bordercolor='#FFFFFF' width='37'");
  document.write(" background='../sim/CalcoloTitoli/gridLeft.jpg'><br><h4>"+
p1Tit +"</h4></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center' valign='bottom' bordercolor='#000000' ");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg'
width='25'");
  document.write(" alt='$ = "+p1Tit+"' height=152></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center' valign='bottom' bordercolor='#000000'");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg'
alt='$= "+p2Tit+" / var= "+ v2 +"%' width='25'");
  document.write("height=" + p2 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center' valign='bottom' bordercolor='#000000'");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg' alt='$
= "+p3Tit+" / var= "+ v3 +"%' width='25'");
  document.write("height=" + p3 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center' valign='bottom' bordercolor='#000000'");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg' alt='$
= "+p4Tit+" / var= "+ v4 +"%' width='25'");
  document.write("height=" + p4 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center'  valign='bottom' bordercolor='#000000' ");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg' alt='$
= "+p5Tit+" / var= "+ v5 +"%' width='25'");
  document.write("height=" + p5 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center'  valign='bottom' bordercolor='#000000' ");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg' alt='$
= "+p6Tit+" / var= "+ v6 +"%' width='25'");
  document.write("height=" + p6 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center'  valign='bottom' bordercolor='#000000' ");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar1.jpg' alt='$
= "+p7Tit+" / var= "+ v7 +"%' width='25'");
  document.write("height=" + p7 + " ></td>");
  document.write("<td background='../sim/CalcoloTitoli/grid.jpg'
align='center'  valign='bottom' bordercolor='#000000' ");
  document.write("width='50'><img src='../sim/CalcoloTitoli/bar2.jpg' alt='$
= "+pTit+" / var= "+ v +"%' width='25'");
  document.write("height=" + p + " ></td></tr>");
  document.write("<tr bgcolor='#FFFFFF' bordercolor='#FFFFFF'>");
  document.write("<td height='18' valign='top' bordercolor='#000000'
bgcolor='#000000' width='29'>&nbsp;</td>");
  document.write("<td align='center' width='50'
height='18'>Collocamento</td>");
  document.write("<td align='center' width='50' height='18'>95</td>");
  document.write("<td align='center' width='50' height='18'>96</td>");
  document.write("<td align='center' width='50' height='18'>97</td>");
  document.write("<td align='center' width='50' height='18'>98</td>");
  document.write("<td align='center' width='50' height='18'>99</td>");
  document.write("<td align='center' width='50'
height='18'>00</td></tr></table></center>");
</script>
</body>
</html>
sapreste darmi un'imbeccata?
grazie in anticipo a tutti
Marco

 riga 21 errore previsto ')'
scusa ma le righe 7 e 21 quali sono ????
ciao
--
Kappa
kappa**nospam**@
webngo.net
www.webngo.net