i have this html file on server A (e.g.: http://www.test.de/test/index.html):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8">
<title>untitled</title>
<meta name="generator" content="TextMate
http://macromates.com/">
<meta name="author" content="HAG">
<script src="prototype.js"
type="text/javascript"></script>
<script type="text/javascript">
var aktiv = window.setInterval("requestPHP()", 1000); // jede sek
(1000) wird gepostet
function requestPHP()
{
var url = ''http://www.fun.com/test/test.php'';
var someContent = random();
var myAjax = new Ajax.Updater(
{success:''output''},
url,
{
method: ''GET'',
parameters:{
content: someContent
},
onFailure: reportError
});
}
function reportError(request)
{
alert(''Sorry. There was an error.'');
}
function random()
{
var number = Math.round(Math.random() * 350); // Limit 350
return number;
}
</script>
</head>
<body>
<b>This is a random number:</b>
<div id="output"></div>
</body>
</html>
and this php-script on server B (e.g.: http://ww.fun.com/test/test.php):
<?php
echo $_GET[''content''];
?>
when i call http://www.test.de/test/index.html nothing happens. but
when all the files are on one server it works and every minute there
is a new randomnumber. does anyone know why this did not work on
seperated server?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---