//=============================================================================
// $Id: keypress.js,v 1.1 2006/06/30 12:43:17 IDF+jaffif Exp $ 
//=============================================================================
/***********************************************************************
 * NOM DU FICHIER : keypress.js
 *	OBJET : fonctions concernant des actions en réponse aux événements 
 *          de touches pressées coté client 
 * AUTEUR : David Piquet
 * CREATION : 4/11/2004
 * PARAMETRES :
 *		Entree: Aucun
 *		Sortie: Aucun
 * ***********************************************************************/
 
//déclenchement de l'événement click d'un bouton(Id en paramètre) à partir d'autres controles
//Ajouter l'attribut au control déclencheur (textbox, dropdownlist ...)
//par exemple: txtDateCreation.Attributes.Add("onkeydown","fnTrapKD(document.all." + btnRechercher.ID + ")");
 
function fnTrapKD(btn)
{
	if (document.all)
	{
		if (event.keyCode == 13)
		{
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		} 
	}
}

/*var key1="13";
var x='';

function handler(e)
{
alert('0');
	if (document.all)
	{
alert('1');
		var evnt =  window.event;
alert('1.1');
		x=evnt.keyCode;
alert('1.2');
	}
	else
	{
alert('2');
		x=e.keyCode;
alert('2.1');
	}
	if(x==key1)
	{
alert('3');
		alert('you cliked enter");
alert('3.1');
	}
	if (!document.all)
	{
alert('4');
		window.captureEvents(Event.KEYPRESS);
alert('4.1');
		window.onkeypress=handler;
alert('4.2');
	}
	else
	{
alert('5');
		document.onkeypress = handler;
alert('5.1');
	}
	if (document.all!=null)
	{
		alert('0');
		alert(window.event.keyCode);
		alert('1');
		if (event.keyCode == 13)
		{
			alert('2');
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		} 
	}
}*/


//==========================================================================
// Informations mis automatiquement par CVS ne pas modifier
// historique du fichier
// $Log: keypress.js,v $
// Revision 1.1  2006/06/30 12:43:17  IDF+jaffif
// Fichier temporaire créé par Visual Studio .NET pour détecter les fonctionnalités PushOk CVS Proxy.
//
// Revision 1.3  2006/01/30 09:05:55  IDF+bvincent
// remise en état du javascript sur la page de login
//
// Revision 1.2  2006/01/16 13:43:56  IDF+bvincent
// *** empty log message ***
//
// Revision 1.1  2005/06/24 09:42:08  IDF+dpiquet
// Ajout keypress.js
//
//==========================================================================


