Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
365
igtxt:WebTextEdit to execute a Javascript function
posted

Hi, I need help please.


I have a javascript function within a xslt file.

On my dev tool, I have a WebTextEdit box with the properties & events.
on the KeyPress event i want to add the javascript function IsNumeric().

var edit = igedit_getById("FG2100RefNo"); IsNumeric(edit);

but i get the the error: can't eval.


Please Assist, Regards!

 

Parents
No Data
Reply
  • 365
    posted

    Hi, I need to execute an entire javascript function.

    Found what i was doing wrong:   var edit = igedit_getById("FG2100RefNo");var editText = edit.getText();alert(!isNaN(editText));
    But this only checks & displays a message box.

    I need to execute the below BLOCKED SCRIPT

    <SCRIPT language=Javascript>
          <!--
          function isNumberKey(evt)
          {
             var charCode = (evt.which) ? evt.which : event.keyCode
             if (charCode > 31 && (charCode < 48 || charCode > 57))
                return false;

             return true;
          }
          //-->

       </SCRIPT>
        onkeypress="return isNumberKey(event)"

    How do i do this with the webtextedit:

    var edit = igedit_getById("FG2100RefNo");var editText = edit.getText(); function isNumberKey(evt){var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;return true;} return isNumberKey(editText)

    I only have the onkey event property value to insert the code! 

    Please Assist

Children