Foros del Web » Programando para Internet » Javascript » Frameworks JS »

mensaje = Resource id #3

Estas en el tema de mensaje = Resource id #3 en el foro de Frameworks JS en Foros del Web. Nose ni entiendo por que me sale este mensaje => Resource id #3 Estoy aprendiendo AJAX de un libro. Este es el codigo: 1er archivo ...
  #1 (permalink)  
Antiguo 13/05/2008, 21:47
 
Fecha de Ingreso: mayo-2008
Mensajes: 6
Antigüedad: 16 años
Puntos: 0
mensaje = Resource id #3

Nose ni entiendo por que me sale este mensaje => Resource id #3
Estoy aprendiendo AJAX de un libro. Este es el codigo:

1er archivo news.php

<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script language="JavaScript">
function xmlhttpPost(strURL)
{
var xmlHttpReq=false;
var self = this;
if (window.XMLHttpRequest)
{ self.xmlHttpReq = new XMLHttpRequest(); }
else if (window.ActiveXObject)
{ self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); }
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() //aqui tenia unas mayusculas
{
if (self.xmlHttpReq.readyState == 4)
{ updatepage(self.xmlHttpReq.responseText); }
}
self.xmlHttpReq.send(getquerystring());
}

function getquerystring()
{
var form = document.forms['editform'];
var news = form.news.value;
qstr = 'article=' + escape(news);
return qstr;
}

function updatepage(str)
{
document.getElementById("resultado").innerHTML = str;
document.getElementById("mensaje").innerHTML = "ACTUALIZADO";
}

</script>

<style>
body, p, input, textarea, div {font: bold 8pt verdana, sans-serif;}
a, span {
font: bold 8pt verdana, sans-serif;
text-decoration:none;
color:red;
}
</style>

</head>

<body>

<div id="resultado">
<?
$news="news.txt";
$text= fopen ($news,'r');
$content=fread($text,filesize($news));
fclose($text);
echo($content);
?>
</div>
<i>Actualizacion</i>
<form name="editform" method=post>
<textarea name="news" cols=50 rows=35 wrap=soft>
<? echo($content); ?>
</textarea>
<input value="Actualizar" type="button" onClick='JavaScript:xmlhttpPost("writer.php")'>
</form>
<span id="mensaje"></span>
</body>
</html>


2do Archivo writer.php

<?

$bulletin="news.txt";
$text=fopen($bulletin, 'w') or die("falta archivo");
$article=utf8_encode($text);
$article=utf8_decode($text);
$article=stripslashes($text);
$article=htmlentities($text);
$article=str_replace('&gt;','>',$text);
$article=str_replace('&lt;','<',$text);
fwrite($text,$article);
fclose($text);
$news="news.txt";
$text=fopen($news,'r');
$content=fread($text,filesize($news));
fclose($text);
echo($content);

?>

El archivo news.txt puede tener cualquier informacion.
Gracias de antemano y espero que me puedan ayudar.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:11.