2 Replies Latest reply on Dec 20, 2010 6:38 PM by juresti

    String Replace will not work

    juresti Level 1

      if(bookmark.indexOf("Q") !== -1){
         //add the underscore after the Q to match filename
         bookmark = bookmark.replace("Q", "Q_");
         swfURL = bookmark +".swf";


      when I


      trace(swfURL); or trace(bookmark); I do not get the underscore added.


      it traces to Q23.swf and Q23 I want Q_23.swf


      where the original value is "Q23"


      Does anyone see what I am doing wrong?