All i want to do is remotely ask a question on ask.fm using java nad HTMLUnit framework. I think it doesn\'t work because of the javascript code, but i\'m not sure.
this
You are doing it right, you are just not waiting enough for the submit to be processed. Add this after the HtmlPage click = button.click(); line:
HtmlPage click = button.click();
webClient.waitForBackgroundJavaScript(10 * 1000);
It will wait 10 seconds. For a maybe nicer solution, you can try this one also.