http://abc.com/index.php
function DENOnKeyDownFunction(){
[color=#FF0000]call_ajax();[/color]
}
function DenIE_OnKeyDown(){
var e = FCK.EditorWindow.event ;
var alreadyRun = false;
// alert(e.keyCode);
switch ( e.keyCode ){
case 13 : // ENTER
if ( !(e.ctrlKey || e.altKey || e.shiftKey) ){
e.cancelBubble = true ;
e.returnValue = false;
if (alreadyRun == false) {
DENOnKeyDownFunction();
alreadyRun = true
}
return false;
}else{
return true;
}
break ;
}
}
var DenGecko_OnKeyDown = function(e) {
var alreadyRun = false;
// checks if enter key alone was pressed, and if so, say hello!
if (e.which == 13 && !e.shiftKey && !e.ctrlKey && !e.altKey) {
e.preventDefault();
e.stopPropagation();
if (alreadyRun == false) {
DENOnKeyDownFunction();
alreadyRun = true
}
return false;
}
return true
};
function FCKKeyPress_SetListeners() {
if (document.all) { // If Internet Explorer.
FCK.EditorDocument.attachEvent("onkeydown", DenIE_OnKeyDown ) ;
}else{ // If Gecko.
FCK.EditorDocument.addEventListener( 'keypress', DenGecko_OnKeyDown, true ) ;
}
}
FCK.Events.AttachEvent( 'OnAfterSetHTML', FCKKeyPress_SetListeners ) ;

Re: Javascript function issue
all i need to do was call the function as
parent.call_ajax();
worked