trying to use normalize-space in code - InfoPath Dev
in

InfoPath Dev

trying to use normalize-space in code

Last post 11-21-2007 08:12 AM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-19-2007 05:28 PM

    trying to use normalize-space in code

    I am trying to get the normalize-space function to work on a text box. I've enclose my code, any ideas? 

     

    function trimIt()

    {

          var txt_RelmNumberField = XDocument.DOM.selectSingleNode("//my:txt_RelmNumber");

         txt_RelmNumberField.text = text.normalize-space(txt_RelmNumberField.text);

     } 

  • 11-21-2007 08:12 AM In reply to

    Re: trying to use normalize-space in code

    Hi Ed,

    You're trying to use an XSL function within JScript, and that's not going to work.  You need to perform the operation with valid JScript functions.  Here is a link on how this guy did it: http://www.aspdev.org/articles/javascript-trim/

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.