|
I found a very simple _javascript_ solution: form.elements['myForm:myButton'].click() This simulates a user click on the button. I have simply hidden the button using CSS, so the user does not see that a GUI form is used. Still I would like NOT to involve a button at all. Does anyone know what it takes to make a regular _javascript_ submit work? Something like form.submit(); In response to Galen Dunklebergers post: I have verified that my "form" var is does indeed contain the form object, but invoking ".submit()" simply reloads the same page as if MyFaces does not realize what just happened. I was guessing that this is because the simulated click makes the browser set the "action="" parameter of the request, but I have not been able to simulate this by something like action=''. I will do some more testing, but if someone has already been down this alley, I would be happy to hear from you. Randahl Enrique Medina wrote: Or you can use forceId ;-) 2005/6/17, Galen Dunkleberger <[EMAIL PROTECTED]>:This document.forms['mySecretAndHiddenForm'].submit(); probably isn't working for you because it's not the id of the form once jsf has renderd it. If you look at the source of the generated html page the id of you form has all the names of the parent containers seperated by :. Anyway i've found the j4j tag library's idProxy tag works great for getting the correct id of an element from _javascript_.On 6/16/05, Randahl Fink Isaksen <[EMAIL PROTECTED]> wrote: |
- Re: Submitting a form automatically (without user cli... Randahl Fink Isaksen
- Re: Submitting a form automatically (without use... Slawek
- Re: Submitting a form automatically (without... Randahl Fink Isaksen
- Re: Submitting a form automatically (without use... Adrien FOURES
- Re: Submitting a form automatically (without... Randahl Fink Isaksen

