1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
/**
* Javascript for the Vatid block.
*
* @copyright 2014 Horde LLC
* @license LGPL-2 (http://www.horde.org/licenses/lgpl)
*/
var HordeBlockVatid = {
onSubmit: function(e)
{
var elt = e.element();
elt.down('IMG').show();
elt.request({
onFailure: this.onFailure.bind(this, e),
onSuccess: this.onSuccess.bind(this, e)
});
e.stop();
},
onFailure: function(e, r)
{
e.element().down('IMG').hide();
},
onSuccess: function(e, r)
{
var elt = e.element();
elt.down('DIV.vatidResults').update(r.responseJSON.response).scrollTo();
elt.down('IMG').hide();
}
};
|