Пример #1
0
/*
 *  Connect the doit submit button to the sender AJAX submit input
 */
$form->Connect("doit", "sender", "ONCLICK", "Submit", array());
/*
 *  Handle client side events on the server side.
 *  Do not output anything before these lines.
 */
$form->HandleEvent($processed);
if ($processed) {
    exit;
}
/*
 *  Did the AJAX submit post any notification message to the application?
 */
if ($form->GetNextMessage($message)) {
    /*
     *  Process and reply to notification messages
     */
    do {
        switch ($message["Event"]) {
            case "submit":
                $message["Actions"] = array();
                /*
                 * Client side form submission request
                 */
                $form->LoadInputValues();
                $error_message = $form->Validate($verify);
                /*
                					$form->GetFileValues("file", $values);
                					$form->SetInputProperty("sender", "Feedback", serialize($values));