function updateServer(xVal){
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 && xmlhttp.status==200)
{
document.getElementById(“txtHint”).innerHTML=xmlhttp.responseText;
}
};
xmlhttp.open(“GET”,”update.php?xPos=xVal&yPos=90&move=walk,true);
xmlhttp.send();

document.write(“in serverSetup”);
}

Applet JAR Example

Applet JAR Example


var applet = document.getElementById(‘MyApplet’);

function performAppletCode(count) {
if (!applet.myMethod && count > 0) {
setTimeout( function() { performAppletCode( –count ); }, 2000 );
}
else if (applet.getRYUX()) {
var num=applet.getRYUX();
updateServer(num);
}
else {
alert( ‘applet failed to load’ );
}
}

performAppletCode( 10 );

From PHP:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: