having trouble with passing variable to ajax

having trouble with passing variable to ajax

I've got a script, embedded into a page, which supposedly should get the text of links being pressed and pass it via json to flask, the python web-framework.

I get the text of the links just OK, but when I pass the variable to ajax, it is not arriving, flask says variable is empty. I found about "traditional: true" setting, but it does not seem to improve the situation.

Please help, totally lost in this...

<script type=text/javascript>
var selected;
$("a").bind('click',function() {
selected=($(this).text());
console.log("selected",selected);
$.ajax({
traditional: true,
type: "POST",
some: selected,    //this is a variable I need to pass through ajax
url: $SCRIPT_ROOT + '/load',
success: function(data) {
console.log(data);
},
});
});
</script>