Forum Moderators: open
Then, in your button's click event, just call doAction().
Alternately, you could use AJAX--but this is probably somewhat simpler of a solution until you start needing the PHP page in question to return a value of some sort. In that case, just use the YUI connection manager or something of that nature. :)
//displays an alert box with a php varible $msg passed into it
function echoAlert($msg){
echo "alert('$msg')";
}//echoAlert
//now just run whatever code we want here is some example code.
$var = "hello";
if($var == "hello"){
echoAlert("true");
}//if
else{
echoAlert("false");
}//else
that will give you an alert box with true. change $var and you get false.
This is actually really handy because you can get the power of php and run it almost as if you are executing it from the client side