17/08/2010, 11:31
|
| | Fecha de Ingreso: agosto-2010 Ubicación: bogota
Mensajes: 6
Antigüedad: 14 años, 3 meses Puntos: 0 | |
Respuesta: ayuda con chat principal.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript">
function nuevoAjax(){
var xmlhttp=false;
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 cargarContenido(){
var contenedor;
var aleatorio=Math.random();
contenedor = document.getElementById('minichat');
ajax=nuevoAjax();
ajax.open("GET", "verchat.php?"+'nocacheww='+aleatorio,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
contenedor.innerHTML = ajax.responseText
}
}
ajax.send(null)
contenedor.scrollTop = contenedor.scrollHeight + contenedor.offsetHeight;
}
function cargarContenido2(){
var t1, t2, t3,contenedor;
var aleatorio=Math.random();
contenedor = document.getElementById('minichat');
t1 = document.getElementById('texto1').value;
t2 = document.getElementById('texto12').value;
t3 = document.getElementById('dir_foto').value;
document.getElementById('texto1').value='';
ajax=nuevoAjax();
ajax.open("GET", "verchat.php?t1="+t3+';'+t2+': '+t1+'&nocacheww='+aleatorio,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
contenedor.innerHTML = ajax.responseText
contenedor.scrollTop = contenedor.scrollHeight + contenedor.offsetHeight;
}
}
ajax.send(null)
}
</script>
<script type="text/javascript" src="scripts/ajaxupload.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ddd</title>
<style type="text/css">
<!--
#minichat {
position:absolute;
left:14px;
top:61px;
width:606px;
height:289px;
z-index:1;
overflow: scroll;
}
#Layer1 {
position:absolute;
left:15px;
top:390px;
width:505px;
height:46px;
z-index:2;
}
#upload_area {
position:absolute;
left:533px;
top:365px;
width:77px;
height:58px;
z-index:3;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(forma.jpg);
background-repeat: no-repeat;
background-color: #000000;
}
#Layer2 {
position:absolute;
left:275px;
top:334px;
width:124px;
height:73px;
z-index:4;
}
#Layer3 {
position:absolute;
left:14px;
top:333px;
width:315px;
height:58px;
z-index:5;
}
-->
</style>
</head>
<body onload="setInterval('cargarContenido()',1000)">
<div name="minichat" id="minichat"></div>
<div id="Layer1">
<strong>mensaje</strong><br />
<input name="texto1" type="text" id="texto1" onkeyup = "if(event.keyCode == 13) cargarContenido2()" size="75" />
<br />
</p>
</div>
<div id="upload_area" >
<input name="dir_foto" type="hidden" id="dir_foto" />
</div>
<div id="Layer2">
<!------------julio---------------->
<form action="scripts/ajaxupload.php" method="post" name="sleeker" id="sleeker" enctype="multipart/form-data">
<input type="hidden" name="maxSize" value="9999999999" />
<input type="hidden" name="maxW" value="50" />
<input type="hidden" name="fullPath" value="uploads/" />
<input type="hidden" name="relPath" value="../uploads/" />
<input type="hidden" name="colorR" value="255" />
<input type="hidden" name="colorG" value="255" />
<input type="hidden" name="colorB" value="255" />
<input type="hidden" name="maxH" value="50" />
<input type="hidden" name="filename" value="filename" />
<p>Foto<br />
<input type="file" name="filename" onChange="ajaxUpload(this.form,'scripts/ajaxupload.php?filename=name&maxSize=999999999 9&maxW=200&fullPath=uploads/&relPath=../uploads/&colorR=255&colorG=255&colorB=255& maxH=300','upload_area','Wait...<br /><img src=\'images/loader_light_blue.gif\' width=\'128\' height=\'15\' border=\'0\' />','<img src=\'images/error.gif\' width=\'16\' height=\'16\' border=\'0\' /> Error in Upload, check settings and path info in source code.'); return false;" /></p>
</form>
<!------------julio---------------->
</div>
<div id="Layer3">
<p> <strong>tu nombre</strong><br />
<input type="text" name="texto12" id="texto12" />
</p></div>
<p>
<label></label>
<label></label>
</p>
</body>
</html> |