Ciao a tutti sto facendo una semplice prova di un richiesta utilizzando Mootools solo che se setto l'url come http:// la richiesta non viene eseguita ed il javascript si blocca. Vi faccio vedere il mio codice.
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example: Simple Map</title>
<script type="text/javascript" src="js/mootools-1.2.1-core-nc.js"></script>
<script type="text/javascript" src="js/example.js"></script>
<script type="text/javascript">
getXML = function(){
address2 = 'http://www.google.com';
var req = new Request({
method: 'get',
async : true,
url : address2,
onRequest: function() { alert('Request made. Please wait...'); },
onComplete: function(response) { alert('Response: ' + response); },
onSuccess: function(responseText, responseXML){alert(responseText)},
onFailure: function(xhr){alert(xhr.responseText)}
});
req.send();
}
</script>
</head>
<body>
[url="#"]Clicca[/url]
</body>
</html>
appena tolgo tolgo il ":" da "http://" la richiesta parte ma giustamente senza successo.
Cosa sbaglio o dov'è l'errore?