get the parent DIV ID through server side coding [modified]
-
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
-
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
-
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
-
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
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.
-
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
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!
-
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!
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