Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/12/2005, 03:52
Avatar de mixgo7
mixgo7
 
Fecha de Ingreso: noviembre-2005
Mensajes: 23
Antigüedad: 18 años, 6 meses
Puntos: 0
grax llegando a la pega ...
lo pruebo para despues subir el code

nop junka reeedite el codigo no me junko:



codigo del que sube:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<script language="javascript">
function Ajax() {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {

try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp
}
function Upload(){
_mensajes = document.getElementById('mensajes');
_target = document.getElementById('objetivo');
_dato = document.getElementById('upload').value;


_ajax=Ajax()
_URL_="cargar.asp";

_ajax.open("Post",_URL_,true);
_ajax.onreadystatechange=function() {

if (_ajax.readyState==1)
{
_mensajes.style.display = ''
_mensajes.innerHTML = "<strong class=text><em>Subiendo foto</em></strong>";
}
else if(_ajax.readyState==4)
{
if(_ajax.status==404) {
_mensajes.innerHTML = "<strong class=text><em>Error cargando la página contáctese con el administrador de la pagina Web ...</em></strong>"
}
if (_ajax.status == 200) {
alert(_ajax.responseText);
}

}
}
_ajax.setRequestHeader('Content-Type','multipart/form-data');
_ajax.send('file=' + _dato);


}
</script>
<body>
<form action="javascript:Upload();" method="post" enctype="multipart/form-data" name="form1" id="form1">
<label>
<input name="upload" type="file" id="upload" value=""/>
</label>
<label>
<input type="submit" name="Submit" value="Enviar" onclick="javascript:Upload();"/>
</label>

</form>
<div id="mensajes"></div>

<div id="objetivo"></div>
</body>
</html>



el que procesa:




<HTML>
<BODY>

<%
Set Upload = Server.CreateObject("Persits.Upload")
Count = Upload.Save("c:\upload")

Response.Write Count & " file(s) uploaded to c:\upload"

%>

</BODY>
</HTML>

Última edición por mixgo7; 22/12/2005 a las 05:55