Revision history [back]

click to hide/show revision 1
initial version

asked 2018-08-28 16:08:35 +0800

softteam gravatar image softteam

Import file with CDATA in Textbox

Hi all, I would like to move this code below to a file so I can reuse it in more Textboxes without copying the same code, just putting the source of the file in the Textbox tag. Is it possible? Thanks.

<textbox id="TBIdFunc" xmlns:w="client">                                            
  <attribute w:name="doKeyDown_">
    <![CDATA[
      function (evt) {
        var keyCode = event.keyCode;
          if( keyCode == 8 // back space
            || keyCode == 13 // enter
            || keyCode == 16 // enter
            || (keyCode >= 35 && keyCode <= 40) // home, end, arrows
            || keyCode == 46) { // Delete                                                    
            this.$doKeyDown_(evt);

          } else if ( !evt.shiftKey &&  // only do without shift key
            (keyCode >= 65 && keyCode <= 90)) {// teclas A-Z                                                 this.$doKeyDown_(evt);                                                                  
          } else {                                                       
             evt.stop();
             return;
          }
       }
   ]]>
 </attribute>
</textbox>

Import file File with CDATA in Textbox

Hi all, I would like to move this code below to a file so I can reuse it in more Textboxes without copying the same code, just putting the source of the file in the Textbox tag. Is it possible? Thanks.

<textbox id="TBIdFunc" xmlns:w="client">                                            
  <attribute w:name="doKeyDown_">
    <![CDATA[
      function (evt) {
        var keyCode = event.keyCode;
          if( keyCode == 8 // back space
            || keyCode == 13 // enter
            || keyCode == 16 // enter
            || (keyCode >= 35 && keyCode <= 40) // home, end, arrows
            || keyCode == 46) { // Delete                                                    
            this.$doKeyDown_(evt);

          } else if ( !evt.shiftKey &&  // only do without shift key
            (keyCode >= 65 && keyCode <= 90)) {// teclas A-Z                                                 this.$doKeyDown_(evt);                                                                  
          } else {                                                       
             evt.stop();
             return;
          }
       }
   ]]>
 </attribute>
</textbox>

File with CDATA JavaScript in Textbox

Hi all, I would like to move this code below to a file so I can reuse it in more Textboxes without copying the same code, just putting the source of the file in the Textbox tag. Is it possible? Thanks.

<textbox id="TBIdFunc" xmlns:w="client">                                            
  <attribute w:name="doKeyDown_">
    <![CDATA[
      function (evt) {
        var keyCode = event.keyCode;
          if( keyCode == 8 // back space
            || keyCode == 13 // enter
            || keyCode == 16 // enter
            || (keyCode >= 35 && keyCode <= 40) // home, end, arrows
            || keyCode == 46) { // Delete                                                    
            this.$doKeyDown_(evt);

          } else if ( !evt.shiftKey &&  // only do without shift key
            (keyCode >= 65 && keyCode <= 90)) {// teclas A-Z                                                 this.$doKeyDown_(evt);                                                                  
          } else {                                                       
             evt.stop();
             return;
          }
       }
   ]]>
 </attribute>
</textbox>
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More