Hi there
I try to implement a function which is called whenever the user type something. The basic idea can be found here: https://sourceforge.net/tracker/index.p ... tid=543655
Because this did not work with the IE (testet at home and at work) I'm now on the way to edit the source directly using FC Preview with the _sources.
I've done the following:
---
FILE: _source/internals/fck_1_gecko.js
LINE35: var oOnKeyDown = function( e )
LINE36: {
LINE37: if ( e.ctrlKey && !e.shiftKey && !e.altKey )
Between LINE36 and LINE37 i done this:
alert('Key pressed!');
---
FILE: _source/internals/fck_1_ie.js
LINE57: function Doc_OnKeyDown()
LINE58: {
LINE59: var e = FCK.EditorWindow.event ;
LINE60: if ( e.keyCode == 13 && FCKConfig.UseBROnCarriageReturn )
Between LINE59 and LINE60 i done this:
alert('Key pressed!');
---
This works fine with netscape 7 and firefox. But it does not work with Internet Explorer. I know there's no need to do an alert after typing text but it's only a basic-test for the functionality...
Can somebody tell me why this isn't working with IE?
Thanks
Kosh
Fri, 04/15/2005 - 10:59
#1
RE: Trying to do something if text is entered
_source/internals/fck_1_ie.js to get changes to work in IE as it loads completely different scripts depending on the browser.
You should be able to make exactly the same changes to fck_1_ie and then everything will work
Chris
RE: Trying to do something if text is entered
RE: Trying to do something if text is entered
okay I am useing 2.0 rc3
if you just place
this.EditorDocument.onkeydown = function()
{
alert('presed2');
}
in your script - not within any other functions
then it works as expected.
not sure when function Doc_OnKeyDown() is being called as it doesn't exist in my code,
so my only guess is it isn't being called correctly
hope that helps and good luck
RE: Trying to do something if text is entered
check with:
http://sourceforge.net/tracker/index.ph ... tid=543655
my code seems to work... for me on both firefox and IE... others seem to be having IE problems.
RE: Trying to do something if text is entered...
@virmaior:
I've found the reason why it does not work in IE correctly. See here: https://sourceforge.net/forum/message.p ... id=3104445
Greets
Chris