...

View Full Version : Not loading the content from an external server



Deroba
12-20-2010, 11:05 PM
Ok, so this is the url http://air.deroba.org/do.php?vid=SR6iYWJxHqs -> Works and sends the info fine.

Now here is the code running main server:


<script type="text/javascript">
function DownloadAndConvert(f)
{
//document.getElementById("process").style.display = "block";
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4) {
if(xmlhttp.status==200) {
document.getElementById("received-content").innerHTML="CORRECT";
* } else {
document.getElementById("received-content").innerHTML="FAILED";
}
}
}
xmlhttp.open("GET", "air.deroba.org/do.php?vid=" + f.vid.value, true);
xmlhttp.send();
}
</script>


<div id="content"><div id="content-body">
<center>
<form name="input" method="get" onsubmit="return DownloadAndConvert(this);">
YouTube Video ID <input type="text" name="vid" id="vid" /><br />
<input type="submit" value="Comenzar!" />
</form><br /><br />
<div id="process" style="display:none;"><img src="http://deroba.org/img/loading.gif" /></div>
<div id="received-content">
Content should change
</div>
</center>
</div>

Any ideas why it will always show FAILED and then reload website?

Thanks :thumbsup:

Deroba
12-20-2010, 11:26 PM
Just to add, the content is received correctly(I used wireshark). But the browser won't show it.

Maybe because i has spaces?

Deroba
12-20-2010, 11:31 PM
Nope, I changed the whole output of the php code to just be HOLA(hello in spanish) didn't work either.

What am I doing wrong here!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum