submit a value using b:button

I know how to submit a value in a form to a php script the "regular" way. However, I can't find out how to submit a value using a "b:button". Any help appreciated.

It works if the Handler of

It works if the Handler of the button selects the form and then submits it:

<form id="myForm" action="dosomething.php" bf:destination="id('result')" bf:mode="replaceChildren" method="POST" title="My Form">
<input type="text" name="myInput">
</form>
<b:button>Submit
<e:handler event="click" type="text/javascript">
form = bb.document.getElementById("myForm");
myForm.submit();
</e:handler>
</b:button>
<div id="result">
</div>

So if you click the button the form gets submitted and the output of "dosomenthing.php" gets into the "result"-div.

hth

Matthias

Thanks a lot

Thanks, Matthias, I'll try that.

Bernhard

Another way to send data

Another way to send data would be using c:load or bb.command.load
Cheers, Ghica