// // Code JavaScript pour le support de l'Ajax. Pour le projet Asloca. // // Auteur: OrdinaSoft // Patrick Lanz // Lausanne // info@ordinasoft.ch // // Premi�re version: 10 mai 2007 // // D�pend de: // - OrdinaSoft.Ajax.js // - DialogBox.js // - Master.js // // Note: quand Ajax_Initialized est d�fini, la biblioth�que OrdinaSoft.Ajax est aussi // initialis�e. //----------------------------------------------------------------------------------------------- // Initialisation du namespace. if (typeof Ajax == 'undefined') Ajax = new Object (); Ajax.Mask = null; //----------------------------------------------------------------------------------------------- // Initialisation. Ajax.Init = function () { // Attend que les d�pendances soient initialis�es if ((typeof OrdinaSoft_Ajax_Initialized == 'undefined') || (typeof DialogBox_Initialized == 'undefined') || (typeof Master_Initialized == 'undefined')) { setTimeout (Ajax.Init, 42); return false; } // non initialis� Ajax.Request.prototype = new OrdinaSoft.Ajax.Request (); // Contr�le si on a re�u une erreur en XML. Si une erreur a �t� re�ue, le message re�u sera // affich�. Doit �tre appel�e lorsque la requ�te est termin�e. // - Le r�sultat sera True si la requ�te est en ordre et False si la requ�te a une erreur. Ajax.Request.prototype.IsXmlOK = function () { var Error = this.Req.responseXML; if (Error == null) return true; Error = Error.getElementsByTagName ('Error'); if (Error.length == 0) return true; OrdinaSoft.DialogBox.MessageBox.Error (OrdinaSoft.Ajax.GetXmlText (Error [0]), Master.AppName); return false; } // Ajax.Request.prototype.IsXmlOK // Premier appel d'un groupe. OrdinaSoft.Ajax.FirstRequest = function () { if (Ajax.Mask == null) { Ajax.Mask = OrdinaSoft.Base.GetClientDiv (); var s = []; s [s.length] = '
' +
'![]() | ';
s [s.length] = '