mdo:submit ( [ validator, ] [ prm-name-1, prm-value-1 [ , ...n ] ] )

mdo:sumbit assigns values to parameters and submits the form. So the page reloads and all modules are rendered using new values of parameters. Actually it creates a javascript that assigns parameters on client and submits form so the result of mdo:submit should be injected into javascript: event handler, javascript function or anchor href attribute.
  • validator is the name of a javascript function that is called before data is sumitted to server. The function must return true or false. If false page is not submitted.

Value of parameter 'test':
<xsl:value-of select="mdo:param('test')" /><br />
<a href="javascript:{mdo:submit('test', mdo:param('test', 0) + 1)}">Increase</a>
There is also a shot form mdo:jsubmit(...) that adds a "javascript:" prefix to be used directly in href context:

Value of parameter 'test':
<xsl:value-of select="mdo:param('test')" /><br />
<a href="{mdo:jsubmit('test', mdo:param('test', 0) + 1)}">Increase</a>

See also:

Last edited Aug 6, 2010 at 12:46 PM by findy, version 8

Comments

No comments yet.