Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/12/2011, 05:07
Asembler24
 
Fecha de Ingreso: febrero-2010
Mensajes: 41
Antigüedad: 14 años, 3 meses
Puntos: 0
Exclamación obtener salida html de un asp por ajax

Estimados, nuevamente concurro a su valiosa ayuda, estoy generando un informe que está en asp y me piden que ese informe tenga un script que genere el informe estático o sea un html, he probado con varias codigos con el cual estoy me genera el archivo con este còdigo

Código ASP:
Ver original
  1. <%
  2.  
  3. Dim objXML,strUrl
  4.  
  5.     strUrl = "http://192.168.2.64:82/oscar/alumnos_destacados.asp?IDCOL=10395449"
  6.     'strUrl = "http://min.e-mat.cl/prgservidor/informefinal_test/inf3_2011.asp?codigocolegio=91765993"
  7. 'Set objXML = Servger.CreateObject ("Microsoft.XMLHTTP")
  8. Set objXML = Server.CreateObject ("MSXML2.ServerXMLHTTP")
  9. 'Set objXML = Server.CreateObject ("MSXML2.XMLHTTP.3.0")
  10. 'Set objXML = Server.CreateObject ("MSXML2.XMLHTTP.4.0")
  11.  
  12. if Err then
  13. Response.write "Error: " & Err.Description
  14. end if
  15.  
  16. objXML.Open "GET", strURL, false, "", ""
  17. objXML.send
  18.  
  19. if objXML.Status >= 400 and objXML.Status <= 599 then
  20. Response.write "Error al obtener página: " & objXML.Status & " - " & objXML.statusText
  21. else
  22. ResponsePage = objXML.ResponseText
  23.  
  24. Set fso = CreateObject("Scripting.FileSystemObject")
  25. Set f = fso.CreateTextFile(Server.Mappath("listado.htm"), False, 1)
  26.  
  27. Response.CodePage = 1252
  28. Response.CharSet = "ISO-8859-1"
  29.  
  30. f.Write ResponsePage
  31. f.Close
  32. set fso = Nothing
  33.  
  34.  
  35. end if
  36.  
  37. Set objXML = Nothing
  38.  
  39. %>

Este código me genera el archivo pero tiene un problema no me toma el css y ese es un problema grave que tengo, he escuchado que se puede hacer por ajax, por favor si fueran muy amables de indicarme si se pudiera hacer por ajax y sin perder los estilos css.

Gracias!