javascript string manipulation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?cm9kY2hhcg==?=

    #1

    javascript string manipulation

    hey all,
    what's the best way to extract info from the following string:

    controlvalueid_ ctl02_DrpX

    i need "_Drp" and everything to the right of it.

    thanks,
    rodchar
  • Mark Rae [MVP]

    #2
    Re: javascript string manipulation

    "rodchar" <rodchar@discus sions.microsoft .comwrote in message
    news:FBF2B345-6C45-4646-A394-2551D929998A@mi crosoft.com...
    what's the best way to extract info from the following string:
    >
    controlvalueid_ ctl02_DrpX
    >
    i need "_Drp" and everything to the right of it.
    Are you trying to find the server-side control ID, as opposed to the
    "munged" client-side control ID...?


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

      #3
      RE: javascript string manipulation


      var s = 'controlvalueid _ctl02_DrpX'.ma tch(/_Drp.*$/)

      -- bruce (sqlwork.com)


      "rodchar" wrote:
      hey all,
      what's the best way to extract info from the following string:
      >
      controlvalueid_ ctl02_DrpX
      >
      i need "_Drp" and everything to the right of it.
      >
      thanks,
      rodchar

      Comment

      • =?Utf-8?B?cm9kY2hhcg==?=

        #4
        Re: javascript string manipulation

        yes Mark but this is the only way i know to get it thru javascript. is there
        another way?

        "Mark Rae [MVP]" wrote:
        "rodchar" <rodchar@discus sions.microsoft .comwrote in message
        news:FBF2B345-6C45-4646-A394-2551D929998A@mi crosoft.com...
        >
        what's the best way to extract info from the following string:

        controlvalueid_ ctl02_DrpX

        i need "_Drp" and everything to the right of it.
        >
        Are you trying to find the server-side control ID, as opposed to the
        "munged" client-side control ID...?
        >
        >
        --
        Mark Rae
        ASP.NET MVP

        >
        >

        Comment

        • George Ter-Saakov

          #5
          Re: javascript string manipulation

          use
          DrpX.ClientID
          or sometimes
          DrpX.UniqueID

          depending on what you need name or id of the control...


          George.


          "rodchar" <rodchar@discus sions.microsoft .comwrote in message
          news:B0DCBA34-1F4D-4BD1-BA5E-4B82400ADA02@mi crosoft.com...
          yes Mark but this is the only way i know to get it thru javascript. is
          there
          another way?
          >
          "Mark Rae [MVP]" wrote:
          >
          >"rodchar" <rodchar@discus sions.microsoft .comwrote in message
          >news:FBF2B34 5-6C45-4646-A394-2551D929998A@mi crosoft.com...
          >>
          what's the best way to extract info from the following string:
          >
          controlvalueid_ ctl02_DrpX
          >
          i need "_Drp" and everything to the right of it.
          >>
          >Are you trying to find the server-side control ID, as opposed to the
          >"munged" client-side control ID...?
          >>
          >>
          >--
          >Mark Rae
          >ASP.NET MVP
          >http://www.markrae.net
          >>
          >>

          Comment

          • =?Utf-8?B?cm9kY2hhcg==?=

            #6
            Re: javascript string manipulation

            but that's on the server-side right? because i'm trying to get to the element
            in javascript.

            "George Ter-Saakov" wrote:
            use
            DrpX.ClientID
            or sometimes
            DrpX.UniqueID
            >
            depending on what you need name or id of the control...
            >
            >
            George.
            >
            >
            "rodchar" <rodchar@discus sions.microsoft .comwrote in message
            news:B0DCBA34-1F4D-4BD1-BA5E-4B82400ADA02@mi crosoft.com...
            yes Mark but this is the only way i know to get it thru javascript. is
            there
            another way?

            "Mark Rae [MVP]" wrote:
            "rodchar" <rodchar@discus sions.microsoft .comwrote in message
            news:FBF2B345-6C45-4646-A394-2551D929998A@mi crosoft.com...
            >
            what's the best way to extract info from the following string:

            controlvalueid_ ctl02_DrpX

            i need "_Drp" and everything to the right of it.
            >
            Are you trying to find the server-side control ID, as opposed to the
            "munged" client-side control ID...?
            >
            >
            --
            Mark Rae
            ASP.NET MVP

            >
            >
            >
            >
            >

            Comment

            • =?Utf-8?B?cm9kY2hhcg==?=

              #7
              RE: javascript string manipulation

              thanks for this one,
              rod.

              "bruce barker" wrote:
              >
              var s = 'controlvalueid _ctl02_DrpX'.ma tch(/_Drp.*$/)
              >
              -- bruce (sqlwork.com)
              >
              >
              "rodchar" wrote:
              >
              hey all,
              what's the best way to extract info from the following string:

              controlvalueid_ ctl02_DrpX

              i need "_Drp" and everything to the right of it.

              thanks,
              rodchar

              Comment

              Working...