Ok, found a solution through java.
Hope it is usefull for somebody.
Having two input buttons in the same form (myform) it works by adding that javascript to the theme:
<script type="text/javascript">
function OnSubmitForm()
{
if(document.pressed == "Ask")
{
document.myform.action ="/ask";
document.myform.method ="post";
document.myform.title.name ="title";
}
else
if(document.pressed == "Search")
{
document.myform.action ="./search";
document.myform.method ="get";
document.myform.title.name ="q";
}
return true;
}
</script>
and as form:
<FORM name="myform" onsubmit="return OnSubmitForm();" method="">
<textarea id="title" NAME="q" rows="2" CLASS="qa-main-my-field" onfocus="this.value=\'\'; this.style.color=\'#000000\'; this.onfocus=null;" >... ask Your question ...</textarea>
<INPUT CLASS="qa-main-my-button" NAME="doask1" title="" onclick="document.pressed=this.value" value="Ask" TYPE="submit">
<INPUT CLASS="qa-main-my-button" NAME="" title="" onclick="document.pressed=this.value" value="Search" TYPE="submit">
</FORM>
It works so far, but could be optimized.
Better would be an aproach where both buttons always send to the same action lets say ./search, and then on severside adding something to the script to redirect in case the ask button was clicked to the ask site. This would avoid the use of the extra java script. If anyone figures that out, please let me know.