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!
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
Hello,
Well, yes, typically Javascript should not be in the XSLT (although it can be) - be then again, it really depends on your scenario.
As far as attaching event directly on the element of the WebTextEdit - yes, this is possible, however you need to use the <input> element of the editor, which can be obtain using the "elem" property of the editor client-side object.
For more information, please check out the following CSOM help article (and especially the "elem" help topic)
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebTextEdit_Object_CSOM.html