You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Drew Davidson <dr...@ognl.org> on 2004/09/11 01:46:47 UTC

Naming a form?

I've got a form that I've tried to name using:

    <form jwcid="parentForm@Form" ...>
    </form>

then activate this later with an image button:

            <a href="#" onclick="javascript: 
document.forms['parentForm'].submit();"><img jwcid="@Image" 
src="../../context/images/next_up.gif" width="79" height="36" 
image="ognl:assets.next"/></a>

But it doesn't work.  The form emitted in HTML has a name of 'Form0'.  I 
can include the "name" attribute but then it emits two name attributes 
to the HTML!

I have successfully named form elements and they do the right thing.  Am 
I missing something?

- Drew

-- 
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
|  Email: drew@ognl.org          /
|    Web: http://www.ognl.org   /
|    Vox: (520) 531-1966       <
|    Fax: (520) 531-1965        \
| Mobile: (520) 405-2967         \
+---------------------------------+


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


Re: Naming a form?

Posted by Paul Ferraro <pm...@columbia.edu>.
This doesn't answer your question, but why not use the ImageSubmit 
component instead?  That way you won't have to worry about triggering 
the form submit yourself.

Paul

Drew Davidson wrote:

> I've got a form that I've tried to name using:
>
>    <form jwcid="parentForm@Form" ...>
>    </form>
>
> then activate this later with an image button:
>
>            <a href="#" onclick="javascript: 
> document.forms['parentForm'].submit();"><img jwcid="@Image" 
> src="../../context/images/next_up.gif" width="79" height="36" 
> image="ognl:assets.next"/></a>
>
> But it doesn't work.  The form emitted in HTML has a name of 'Form0'.  
> I can include the "name" attribute but then it emits two name 
> attributes to the HTML!
>
> I have successfully named form elements and they do the right thing.  
> Am I missing something?
>
> - Drew
>


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