1 Reply Latest reply on Feb 22, 2013 12:56 PM by George_Johnson

    how to bold part of text in javascript

    Jonathan Stephenson

      Hi,

       

      I have a form which puts several text fields in to one text box. I have a link at the bottom as an example. It was based on an example I found on: http://www.assuredynamics.com/index.php/portfolio/concatenating-and-floating-fields/

       

      Basically Im nearly there, but just need to make the first part of the detail Bold in the target text box. This part is the 'tel 5.rawvalue', tel 6.rawvalue' etc. Does anyone know how to make this bold in the code? It is from the target text box calculation script? The code is here and ive made the bits I want in bold red:

       

      var vString = "";

       

      if (_5th_phone.rawValue != null) {

                vString = vString + "\n" + Tel5.rawValue +" " + _5th_phone.rawValue;

       

      }

       

      if (_6th_phone.rawValue != null) {

                vString = vString + "\n" + Tel6.rawValue + " " + _6th_phone.rawValue;

      }

      if (_7th_phone.rawValue != null) {

                vString = vString + "\n" + Tel7.rawValue +" " + _7th_phone.rawValue;

      }

      if (_8th_phone.rawValue != null) {

                vString = vString + "\n" + Tel8.rawValue + " " + _8th_phone.rawValue;

      }

       

      this.rawValue = vString;

       

      This is the form:

      https://workspaces.acrobat.com/?d=lyBRPEnbxG6c0CK*BOsqNg

       

      Many Thanks