This is a user but
I would suggest using AJAX to call the method and make the method return something meaningful. If all you want to do is show an element, make the method return a boolean.