Location: PHPKode > projects > SimpleHRM > simplehrm-1.0-beta1/simplehrm-1.0-beta1/templates/default/admin/setting/test.tpl.html
{literal}
<script>
/*$(document).ready(function() {
//CKEDITOR.dom.event('key',function(event){
//	alert(event.getKey());
//});



var element = CKEDITOR.document.getById( 'txta' );

//alert(element.on);

element.on( 'getKey', function(ev) {
//	alert("ssss");
        // The DOM event object is passed by the "data" property.
	// var domEvent = new CKEDITOR.dom.event(ev);
	   var domEvent = ev.data;
	alert(domEvent);		
        // Add a CSS class to the event target.
        //domEvent.getTarget().addClass( 'clicked' );
//	alert("dddd");
	alert(domEvent.getKey());
//	alert(e.data.keyCode);
//	alert(domEvent.getKeystroke());
  });
//element.fire( 'key', 'Example' );
});*/
</script>
{/literal}
<form>
<input type="text" class="txtval" name="txt1">
<textarea class="txtval" name="txt2"></textarea>
<textarea class="txt" id="txta" name="txt3" ></textarea>
<input type="button" onclick="test();" value="click"/>
</form>
<span id="cnt"></span>
{literal}
<script>
function t(){
	alert(event.getKey());
}

function test(){
var keys='';
$('.txtval').each(function(){
	keys +=$(this).attr('name')+"='"+$(this).val()+"'&";
	});
alert(keys);
}

CKEDITOR.config.skin='kama';
CKEDITOR.replace('txta');
//CKEDITOR.dom.event('keyup',function(event){
//	alert(event.getKey());
//});


//<object>.on( 'key', function( e ){ ... } )
//CKEDITOR.on( '', function( e ){ ... } )
//CKEDITOR.dom.event(domEvent)
//alert( event.getKeystroke() == 65 );

//var charCount= document.getElementById("txta");
/*CKEDITOR.on("keydown", function(event) 
{
     var curVal = charCount.value; //get current value
	alert(curVal);

//     curVal += 1; //add one (this event should fire on each keydown)
  //   charCount.value = curVal; //update the span to show the current number of characters
});*/


//var charCount = document.getElementById("cnt");
CKEDITOR.instances.txta.on("key", function (event)
{
	alert(event.data.keyCode);
//        charCount.innerHTML = CKEDITOR.instances.txta.getData().length;
//	alert(x.getKey());
});


{/literal}
</script>
Return current item: SimpleHRM