Ciao...
Sono di nuovo qui perchè non riesco a capire una cosa...
Carico in flash un file esterno ASP che prende i dati da un database...
Fin qui tutto funziona bene, il problema arriva quando scrivo delle frasi con l'apostrofo! Mi si blocca e mi dà caricamento errato...![]()
Il problema penso che stia dove ho evidenziato...
Questo è il codice che si trova all'interno del file ASP:
Vi metto anche il codice inserito in flash:codice:<% response.ContentType = "text/xml" Const adOpenKeyset = 1 Const adLockReadOnly = 1 StrConnessione = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("/mdb-database") & "\news.mdb" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open StrConnessione SQL = "SELECT * FROM rssnews order by id DESC" Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open SQL, Conn, adOpenKeyset,adLockReadOnly Response.Write "<news>" Do while not rs.eof and numrec > 0 Response.Write "<new titolo='" & rs("titolo") &"' notizia='" & rs("notizia") &"'/>" rs.movenext numrec = numrec -1 Loop Response.Write "</news>" rs.close set rs=nothing Conn.Close set Conn=nothing %>
Mi sapete dire come risolvere questo mio problema?!?!codice:onClipEvent (load) { this.stop(); mio_xml = new XML(); mio_xml.path = this; mio_xml.ignoreWhite = true; mio_xml.onLoad = function(success) { if(success){ var t1 = "<font color='#FF9900'>"; var t2 = "</font>"; var t3 = "<font color='#000000'>"; var t4 = "</font>"; var nodes = this.firstChild.childNodes; for(var i = 0; i < nodes.length; i++){ var titolo = nodes[i].attributes.titolo; var descrizione = nodes[i].attributes.descrizione; this.path.testo += " "; this.path.testo += t1 + titolo + t2 + " "; this.path.testo += t3 + descrizione + t4 + " "; } } else { this.path.testo = "caricamento errato"; } this.path.nextFrame(); }; mio_xml.load("news.asp"); }
(...Spero che qualcuno mi risponda...)
Ciaoooo...![]()

Rispondi quotando
