OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
multiple parentNode (s)
This page's ID:
10799
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
OK, I have this page, and inside it contains a complicated table inside a <div>. I plan to assign an image inside one of the tables (inside a table) as a control to do something with the parent DIV. Easy enough, it seems, and yes, I do have a snippet that works, but.. er, it looks frigging *hideous*! I have this line for instance, to alter the width of that div... this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.width = x; I imagine you'll all agree that a string such as this doesn't seem very elegant, does it? I'd love to find that there's some hack like parentNode[9] or something, but that doesn't seem to work for me. Does anyone know how this all works, and offer a variant I could use? I'm trying top avoid using "id"'s for every object, as there may end up being many of these beasts written into one page. TIA! I'm off to keep digging for the answer myself, but would love some help if you can give it. Your pal, -doc- [url=http://www.ozones.com/] [img]http://www.ozoneasylum.com/examples/ozoneSIGc.gif[/img] [/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »