Ajax - how to identify the target wrapper element

More of a discussion than a technical question really, just wondering what alternative methods are used to identify the target wrapper for an Ajax content request.

At the moment in my simple Ajax framework, I simply update the parentElement.innerHTML. However, I probably need a better way to identify the target element.

The ways I have currently considered:

Duplicate name:
Code:
<div name = "target1">
<div>
<a href=... name="target1" class="AjaxLink">

Ajax wrapper class in parent tree:
Code:
<div class = "AlaxTarget">
<div>
<a href=... class="AjaxLink">

Custom Id attribute:
Code:
<div id = "Target1">
<div>
<a href=... class="AjaxLink" data-target="Target1">

Pass string to relative target object:
Code:
<div class = "AjaxTarget">
<div>
<a href=... class="AjaxLink" target="this.parentElement.parentElement">

Any thoughts, what does everyone else do, are there any standards evolving on how to best identify the target?
 
Back
Top