You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Edoardo Campagnano <ed...@dappolonia.it> on 2006/11/13 11:28:30 UTC

problem with AjaxForm

Hi,

I'm trying to compute a value at the moment my formi s submitted, in this
way

 

<head>

<script type="text/javascript">

      function getMessage() {

                  document.myForm.myHidden.value="Pizzicone"

      }

      </script>

</head>

Edoardo Campagnano

 


Re: problem with AjaxForm

Posted by Sam Gendler <sg...@ideasculptor.com>.
Probably to inject some before advice into the form submission so that
he can set the value before it submits.  When I've had this problem in
the past, I have just used my own submit button instead of tapestry
submit component.  Then I just have my submit button call a javascript
method instead of submitting the form.  Then, at the end of the
javascript method, call the appropriate submit method for the form.
This varies depending on if you are in Tap4 + tacos or Tap 4.1.  In
either case, however, it is pretty easy to figure out by just using a
submit component in the page and then taking a look at the javascript
that executes.

I imagine that the sophisticated way to do this would be to use dojo
to inject some before advice into the form submit event.  But to learn
how to do that, you will have to read the dojo book (which actually
has useful material in it these days!) at
http://manual.dojotoolkit.org/WikiHome/DojoDotBook (although the
section that looks most useful to you is here:
http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book10) and/or
consult with someone who has much more knowledge of the tapestry
specific form submission process than I have.

--sam


On 11/13/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> I think you forgot to list what your problem was.
>
> On 11/13/06, Edoardo Campagnano <ed...@dappolonia.it> wrote:
> >
> > Hi,
> >
> > I'm trying to compute a value at the moment my formi s submitted, in this
> > way
> >
> >
> >
> > <head>
> >
> > <script type="text/javascript">
> >
> >       function getMessage() {
> >
> >                   document.myForm.myHidden.value="Pizzicone"
> >
> >       }
> >
> >       </script>
> >
> > </head>
> >
> > Edoardo Campagnano
> >
> >
> >
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: problem with AjaxForm

Posted by Jesse Kuhnert <jk...@gmail.com>.
I think you forgot to list what your problem was.

On 11/13/06, Edoardo Campagnano <ed...@dappolonia.it> wrote:
>
> Hi,
>
> I'm trying to compute a value at the moment my formi s submitted, in this
> way
>
>
>
> <head>
>
> <script type="text/javascript">
>
>       function getMessage() {
>
>                   document.myForm.myHidden.value="Pizzicone"
>
>       }
>
>       </script>
>
> </head>
>
> Edoardo Campagnano
>
>
>
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com