Use this in the page footer (after the element to be changed)
<script>
document.getElementById( 'user-xprofile' ).onclick = function() { MyFunction(); };
</script>
Change the html content and add an on click submit form to a span
<script>
document.getElementById( 'ajax_value1' ).innerHTML = 'Click here...';
document.getElementById( 'ajax_value1' ).onclick = function(){document.getElementById( 'my_form_id' ).submit();};
</script>
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.