Hey Guys,
I tried to simplify this alot... and wrote this code and my understanding of
what each thing does... but I have yet to get it to work :o) but not giving
up! can you guys get this to work or see something obvious that I am doing
wrong.. I am using prototype 1.6.0.2 and safari or firefox

PHP code : proto_test_script.php
--------------------------------------------------------------------------------------

<?="Good Day, ".$_GET['name']?>



HTML Page with prototype scripting : proto_test.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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing Prototype</title>
<script type="text/javascript" src="../prototype.js"></script>
    <script>
function makeGreeting()
{
new Ajax.Request(
'proto_test_script.php',   // This is the Script that is called
{
// The Method of passing the variable
method: 'GET',
// The Variable(Parameters) that is passed to proto_test_script
parameters: 'name=' + $F('name'),
// Assign the response of proto_test_script.php to transport.responseText
onSuccess:function(transport)
{
// Change the field greeting
$F('greeting') = transport.responseText;
}
}
);
}
    </script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
  What is your name :
    <input type="text" name="name" id="name" onKeyUp="makeGreeting();"/>
<br />
    <input name="greeting" type="text" id="greeting" size="50" />
</form>
</body>
</html>

-- 
Joe Harman

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to