Search code examples
javascriptxpages

XPages how to get the id of the link when clicked in xp:this.script?


How can I get the ID of the link when I click it in the xp:this.script ?

$(this).attr('id') will return an undefined cause this probably refers to the script not the xp:link


Solution

  • try this

    $(this).getParent().attr("id")