Can we use jQuery to simulate a keypress event? Help...

Can we use jQuery to simulate a keypress event? Help...

Hi all,

I am new to jQuery and have a problem. I am currently working on a kiosk web app, that uses an on screen keyboard.

The keyboard is in flash and calls a javascript function as below to input symbols into the text field.

  1. function printSymbol(symbol)
    {
        document.getElementById('date').value += symbol;
    }


This works fine, however it does not fire the keydown or keypress event so most field related jquery stuff will not work, i am currently trying to get a mask input on this text field, but no joy.

I Am using http://digitalbush.com/projects/masked-input-plugin/ using the following code.

  1. jQuery(function($){
       $
    ("#date").mask("99/99/9999");
    });
This jQuery works if i use a standard keyboard, but not with my flash keyboard/javascript printSymbol function.

Does anyone at all have any idea how i can get this to work, i am open to all suggestions.

Thanks in advance
Mat.