I have a link element as below, the value of this link element is set dynamically (Asynchronously).
The value of the label will be null until its set by an ajax call asynchronously.
<a href="#" onclick="myFuncton(**I want to pass the label element value - testClass**);"><label class="testClass"></label></a>
I want to pass the value of the label to a JavaScript function.
<script>
function myFunction(label value){
alert(label value);
}
</script>
I am trying to figure out the best way to achieve this. Can someone help me with any suggestions / ideas?