You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Hubert Rabago <hr...@gmail.com> on 2006/05/05 15:56:53 UTC
Re: Emulation of the action link being clicked
Anyone?
On 4/28/06, Hubert Rabago <hr...@gmail.com> wrote:
> I was looking at the sample application in
http://www.jsftutorials.net/interface/jsf-popup.html.
In it, the author has this form:
<h:form id="placeList">
<h:commandLink id="find" action="showPlace" value=""/>
</h:form>
He has some Javascript that essentially sets the value of the command
link equal to its id before submitting the form:
form['placeList:find'].value = 'placeList:find';
with a comment that states "This is an emulation of the action link
being clicked."
Where is this fact documented? I tried looking for it in the spec but
couldn't find it.
thanks,
Hubert
Re: Emulation of the action link being clicked
Posted by Andrew Robinson <an...@gmail.com>.
I use another method. Using CSS, I add a hidden link, then using
javascript, I invoke a mouse click event on the link to cause it to
submit. It behaves just as if the user clicked the link. I posted the
code on a past thread.
On 5/5/06, Hubert Rabago <hr...@gmail.com> wrote:
> Anyone?
>
> On 4/28/06, Hubert Rabago <hr...@gmail.com> wrote:
> > I was looking at the sample application in
> http://www.jsftutorials.net/interface/jsf-popup.html.
>
> In it, the author has this form:
>
> <h:form id="placeList">
> <h:commandLink id="find" action="showPlace" value=""/>
> </h:form>
>
> He has some Javascript that essentially sets the value of the command
> link equal to its id before submitting the form:
> form['placeList:find'].value = 'placeList:find';
>
> with a comment that states "This is an emulation of the action link
> being clicked."
>
> Where is this fact documented? I tried looking for it in the spec but
> couldn't find it.
>
> thanks,
> Hubert
>