Loading ...
Sorry, an error occurred while loading the content.

Adding id="Date_here" to clip

Expand Messages
  • Mike Breiding - Morgantown WV
    Greetings, I would like to modify this clip: P.class-DATE ^!SetPasteIndent Off ^!InsertHtml ^& ^P Which produces this:
    Message 1 of 9 , Nov 10, 2012
    • 0 Attachment
      Greetings,
      I would like to modify this clip:

      P.class-DATE
      ^!SetPasteIndent Off
      ^!InsertHtml <p class="date">^&</p>^P

      Which produces this:
      <p class="date">Date_here</p>

      To produce this:
      <p class="date" id="Date_here">Date_here</p>

      Ideas?

      Thanks,
      -Mike
    • Mike Breiding - Morgantown WV
      I forgot something! Please ignore the first message. ======= Greetings, I would like to modify this clip: P.class-DATE ^!SetPasteIndent Off ^!InsertHtml
      Message 2 of 9 , Nov 10, 2012
      • 0 Attachment
        I forgot something!
        Please ignore the first message.
        =======
        Greetings,
        I would like to modify this clip:

        P.class-DATE
        ^!SetPasteIndent Off
        ^!InsertHtml <p class="date">^&</p>^P

        Which produces this:
        <p class="date">Day Date Year</p>

        To produce this:
        <p class="date" id="Day_Date_Year">Day Date Year</p>

        I would like to add both the ID and replace spaces with underscores.

        Ideas?

        Thanks,
        -Mike
      • Axel Berger
        ... There were several possibilities for the first question and one good one for this: ^!Set %datum%=^?{Date:=^$GetSelection$} ^!Set %iddat%=^$StrReplace(
        Message 3 of 9 , Nov 10, 2012
        • 0 Attachment
          Mike Breiding - Morgantown WV wrote:
          > <p class="date" id="Day_Date_Year">Day Date Year</p>
          > I would like to add both the ID and replace spaces with underscores.

          There were several possibilities for the first question and one good one
          for this:

          ^!Set %datum%=^?{Date:=^$GetSelection$}
          ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";A)$
          ^!InsertHtml <p class="date" id="^%iddat%>%datum%</p>^P

          Untested, may contain nuts.

          Axel
        • Mike Breiding - Morgantown WV
          ... Hi Axel, I get a line two syntax error when I run the clip. Thanks, -Mike
          Message 4 of 9 , Nov 10, 2012
          • 0 Attachment
            On 11/10/2012 8:57 AM, Axel Berger wrote:
            > Mike Breiding - Morgantown WV wrote:
            > > <p class="date" id="Day_Date_Year">Day Date Year</p>
            > > I would like to add both the ID and replace spaces with underscores.
            >
            > There were several possibilities for the first question and one good one
            > for this:
            >
            > ^!Set %datum%=^?{Date:=^$GetSelection$}
            > ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";A)$
            > ^!InsertHtml <p class="date" id="^%iddat%>%datum%</p>^P
            >
            > Untested, may contain nuts.

            Hi Axel,
            I get a line two syntax error when I run the clip.
            Thanks,
            -Mike

            >
            > Axel
          • Axel Berger
            ... I don t and the second of my three lines seems to be fine. There is a mistake though yielding the wrong result, a missing caret in line 3: ^!InsertHtml
            Message 5 of 9 , Nov 10, 2012
            • 0 Attachment
              Mike Breiding - Morgantown WV wrote:
              > > ^!Set %datum%=^?{Date:=^$GetSelection$}
              > > ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";A)$
              > > ^!InsertHtml <p class="date" id="^%iddat%>%datum%</p>^P
              >
              > I get a line two syntax error when I run the clip.

              I don't and the second of my three lines seems to be fine. There is a
              mistake though yielding the wrong result, a missing caret in line 3:

              ^!InsertHtml <p class="date" id="^%iddat%>^%datum%</p>^P

              Axel
            • Axel Berger
              ... I have been using the new version 7 syntax there. For older versions make it: ^!Set %iddat%=^$StrReplace( ; _ ; ^%datum% ;FALSE;FALSE)$ Axel
              Message 6 of 9 , Nov 10, 2012
              • 0 Attachment
                Mike Breiding - Morgantown WV wrote:
                > I get a line two syntax error when I run the clip.

                > > ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";A)$

                I have been using the new version 7 syntax there. For older versions
                make it:

                ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";FALSE;FALSE)$

                Axel
              • Mike Breiding - Morgantown WV
                ... It runs for me know. This is the result: %datum% Anyway to have it retain the original date entry?
                Message 7 of 9 , Nov 10, 2012
                • 0 Attachment
                  On 11/10/2012 12:07 PM, Axel Berger wrote:
                  > Mike Breiding - Morgantown WV wrote:
                  > > I get a line two syntax error when I run the clip.
                  >
                  > > > ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";A)$
                  >
                  > I have been using the new version 7 syntax there. For older versions
                  > make it:
                  > ^!Set %iddat%=^$StrReplace(" ";"_";"^%datum%";FALSE;FALSE)$

                  It runs for me know.
                  This is the result:
                  <p class="date" id="INTRO:_Friday_-_June_11th">%datum%</p>

                  Anyway to have it retain the original date entry?

                  Thanks for the help!
                  -Mike


                  >
                  > Axel
                  >
                  >
                • Ian NTnerd
                  Mike, You have neglected to add in the caret that Axel told you he had omitted from his first reply. The last line should be: ^!InsertHtml
                  Message 8 of 9 , Nov 11, 2012
                  • 0 Attachment
                    Mike,

                    You have neglected to add in the caret that Axel told you he had omitted
                    from his first reply.

                    The last line should be:
                    ^!InsertHtml <p class="date" id="^%iddat%>^%datum%</p>^P

                    Note the ^ before %datum%

                    Ian

                    On 11/11/2012 1:45 AM, Mike Breiding - Morgantown WV wrote:
                    > It runs for me know. This is the result: <p class="date"
                    > id="INTRO:_Friday_-_June_11th">%datum%</p> Anyway to have it retain
                    > the original date entry?
                  • Mike Breiding - Morgantown WV
                    ... Thanks, Ian -Mike
                    Message 9 of 9 , Nov 11, 2012
                    • 0 Attachment
                      On 11/11/2012 8:05 AM, Ian NTnerd wrote:
                      > Mike, You have neglected to add in the caret that Axel told you he had omitted
                      > from his first reply.
                      > The last line should be:
                      > ^!InsertHtml <p class="date" id="^%iddat%>^%datum%</p>^P
                      >
                      > Note the ^ before %datum%

                      Thanks, Ian
                      -Mike

                      > Ian
                      >
                      > On 11/11/2012 1:45 AM, Mike Breiding - Morgantown WV wrote:
                      >> It runs for me know. This is the result: <p class="date"
                      >> id="INTRO:_Friday_-_June_11th">%datum%</p> Anyway to have it retain
                      >> the original date entry?
                      >
                      >
                      >
                      > ------------------------------------
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.