Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. get the parent DIV ID through server side coding [modified]

get the parent DIV ID through server side coding [modified]

Scheduled Pinned Locked Moved Web Development
sysadminhelptutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jills Mathew
    wrote on last edited by
    #1

    Hi, I want to get the ID value or class value of my current DIV's parent using ASP. Does anybody have any idea regarding how to achieve this? <div class="parent" ID="parent_ID">    <div class="child" ID="child_ID">       <%          tmp = <ASP code to get the "parent" DIV's class/ID value>          if tmp="parent" then             do something          else             do some more thing          end if       %>    </div> </div> Please help!!! Thanks - Jills

    modified on Monday, August 3, 2009 3:27 AM

    C S 2 Replies Last reply
    0
    • J Jills Mathew

      Hi, I want to get the ID value or class value of my current DIV's parent using ASP. Does anybody have any idea regarding how to achieve this? <div class="parent" ID="parent_ID">    <div class="child" ID="child_ID">       <%          tmp = <ASP code to get the "parent" DIV's class/ID value>          if tmp="parent" then             do something          else             do some more thing          end if       %>    </div> </div> Please help!!! Thanks - Jills

      modified on Monday, August 3, 2009 3:27 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      This looks like you're using ASP, which you said. ASP.NET replaced ASP about 7 years ago. ASP questions go in the web dev forum.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      J 1 Reply Last reply
      0
      • C Christian Graus

        This looks like you're using ASP, which you said. ASP.NET replaced ASP about 7 years ago. ASP questions go in the web dev forum.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        J Offline
        J Offline
        Jills Mathew
        wrote on last edited by
        #3

        Christian Graus wrote:

        ASP questions go in the web dev forum.

        Sorry for posting it in the wrong section. How can I move this to webdev forum? Regards Jills

        C 1 Reply Last reply
        0
        • J Jills Mathew

          Christian Graus wrote:

          ASP questions go in the web dev forum.

          Sorry for posting it in the wrong section. How can I move this to webdev forum? Regards Jills

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          I'll move it.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          • J Jills Mathew

            Hi, I want to get the ID value or class value of my current DIV's parent using ASP. Does anybody have any idea regarding how to achieve this? <div class="parent" ID="parent_ID">    <div class="child" ID="child_ID">       <%          tmp = <ASP code to get the "parent" DIV's class/ID value>          if tmp="parent" then             do something          else             do some more thing          end if       %>    </div> </div> Please help!!! Thanks - Jills

            modified on Monday, August 3, 2009 3:27 AM

            S Offline
            S Offline
            senorbadger
            wrote on last edited by
            #5

            I Don't think this can be done. Theres no way of knowing the values of the ID's above in ASP3. Please correct me if i'm wrong!

            J 1 Reply Last reply
            0
            • S senorbadger

              I Don't think this can be done. Theres no way of knowing the values of the ID's above in ASP3. Please correct me if i'm wrong!

              J Offline
              J Offline
              Jills Mathew
              wrote on last edited by
              #6

              Thanks senorbadger for the reply. We will get the value in client side using javascript code:

              this.parentNode.getAttribute('class') But I want to do it in server side. Our website is built using ASP. :( Regards, Jills

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups