Haha, okay: You are calling your function onclick="new_string('code=rock')" which triggers the execution of a function. Perfect. But this function is not defined, e.g.
var new_string = function(ev) {
}
instead you are using: $(".new_string").click(function() { which would attach a new onClickHandler to an non - existing element (you are using the class - selektor of jQuery ".classname" and as far as I can see it, there is no element having the class "new_string". So you can either:
<a href="#" class="new_string">Rock</a>
$(".new_string").click(function() {
var oThis = $(this); // this points to the "a" - DOM - element
var code = oThis.html();
dataString_extra = 'code='+ code;
return true;
});
or
<a href="#" onclick="new_string('code=rock')">Rock</a>
var new_string = function(code) {
dataString_extra = code;
return true;
}