Friday, June 20, 2008

Heres my shot and yes Scotland is a different country not Wales. =)

England: Manchester United
Scotland: Rangers
Ireland: Cork City
France: Lyon
Portugal: FC Porto
Spain: Real Madrid
Italy: AC Milan
Sweden: FC Malmo
Norway: Rosenborg
Germany: Bayern Munich
Greece: AEK Athens
Serbia: Red Star Belgrade
Switzerland: FC Basel
Belgium: Anderlecht
Netherlands: Ajax
Turkey: Galatasray
Poland: Wisla Krakow

Give or take a few countries those are my best shots correct me if you may.

1.Wrestling became an Olympic sport in 708 B.C. and was also the final and decisive event of what competition?
2.Who was the youngest U.S. wrestler to win a world title?
3.Which U.S. President often talked about his wrestling days as a young man in Illinois?
4.In The Illiad- Homer recounts a famous wrestling match between Ajax and what other mythological figure?


Everyone gets a Thumbs Up from me Regardless of Answer.

the main php page:
<html>
<body>
<script language="javascript" src="/javascript/xmlhttpobj.js"></script>
<script language = "javascript">
var xmlHttp;

function ajax(){
xmlHttp = getXmlHttpObject();

var url = "ajaz2.php";
url = url + "?dog=" + escape(document.forms["hello"].cat.value);

xmlHttp.open("GET"-url-true);

xmlHttp.send(null);
alert("after send");
xmlHttp.onreadystatechange = StateChange();
}
function StateChange(){

if(xmlHttp.readyState == 4 && xmlHttp.status == 200){
document.getElementById("output").innerHTML = xmlHttp.responseText;

}
}
</script>
<form name="hello">
Enter text here:
<input type="text" name= "cat" autocomplete="off"> <br>
<button type="button" name= "submit" onclick = "ajax();">Ajax!</button>
</form>

<div id="output">
<div class="output">Results will appear here</div>
</div>
</body>
</html>

and this is: ajaz2.php:
<?php
$input = rawurldecode($_GET["dog"]);
print "the input is: $input";
?>

Why does it only work with the alert()?
Ok- well I figured out if I use false instead of true in the open() call it works- and I understand that the problem was that something was happening too quickly- but is there another work around other than setting the the value in open() to false? When would one use true- and when would you use false?

I used to do a lot of programming in the olden days before the dinosaur and the internet. I did dBase- basic- foxpro- a lot of VB- and some others. In the past 10 to 15 years- I ve gotten away from it and have done more programming management than anything else. I d like to get back into coding- but there seems to be a lot of choices.

What is the general consensus for a good programming path? C?- Java?- Ajax?- Python?- Perl?- .Net?- something else?

No comments: