The XMLHttpRequest object (the object responsible for nifty AJAX things like Google maps and Gmail) allows for invisible communication with your server from the browser. I recommend using some AJAX library to cover the cross-browser differences. THe most popluar one is Jquery, which allows code like this:
$.post('/path/to/script.php', {
"key": "Value",
"anotherkey": "it's value"
}, function (dat){
//this function will be called when it is succesful
//the variable dat is populated witht he server's response.
});
This allows for simple seamless communication with the browser.