Looks like you want something like
    var lnkId = this.parentNode.parentNode.parentNode.getAttribute('id');

On 9/8/2011 9:13 AM, Robert wrote:
Hi,

I am not so keen in the event model, so maybe some can help me.


I successfully have attached my event to a list of links. So if one of these links is clicked, a small function is called. In the event I can get the link itself but this is not enough (the link is not unique). I need the id of the parent list-element.


This is the code of the site:

    <ul class="post-list news-feed thread" id="news-feed">
    <li class="activity-item" *id="38046445"*>
    <ul class="icon-links-list inline-middle mb10">
    <li class="copy-light date">06.09.2011, 16:17</li>
    <li><a class="message-lightbox-link text icon-links icn-ext-info-msg"
                       href="/someurl/always/the/same">New
    message</a></li>
    </ul>
    </li>

    <li class="activity-item" id="38046537">
    <!-- ... -->
    </li>

    <!-- and so on --->
    </ul>

My event is attached to the "new message" link. When this link is pressed, a "Write a new mail" DIV-window is opened.

What I want to do is to insert some data in the form of the new window. The data is accessible via the id of the list element. So I need this id to go on. But currently I do know how to get this id in my function.


maybe someone has a hint for me? Or an idea how to solve this situation? This would be great!


Tnx in advance,
Robert


--
You received this message because you are subscribed to the Google Groups "greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.


--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to