|
Posted by JM on 01/05/07 20:42
Floortje wrote:
> Pugi! schreef:
>
>> Can anyone help me, point me in the right direction or link to an
>> example ?
>
> Right direction is don't do it .. it's not going to be stable.
>
> that said .. try this link http://www.captain.at/ajax-file-upload.php
>
>> thanx,
>>
>> Pugi!
>
> Np
>
>
I kinda figured that out myself. For all the other forms I use ajax. The
form with the upload I use an ordinary submit but in the form tag I
direct (target-tag) the action (action-tag) to a hidden IFrame. The
server outputs javascript in the iframe which declares a variable
successfull (true or false) and an associative array (empty when
successfull, when not successfull the key contains the id of the input
or select field, the value contains the corresponding error message). I
call a function declared in the main page with these two variables. When
the submit was succesfull, the form is removed. Otherwise under each
input or selectfield of which the input is not valid or missing when
required the error message is displayed. Works very nice. Is not really
AJAX, but look and feel and used technology is similar.
Pugi!.
Navigation:
[Reply to this message]
|