Re: [BUG] javascript error on mozilla when click()

2007-02-28 Thread Mario Ivankovits
Hi!
 Hello I use javascript to simulate button click and send a postback to the
 server. Here is the java script:

 document.getElementById('myId').click();
   
If possible have a look at our sandbox component s:submitOnEvent [1]

It solves many of the problems you might have when you try to do it
manually.


Ciao,
Mario


[1] http://wiki.apache.org/myfaces/SubmitOnEvent



Re: [BUG] javascript error on mozilla when click()

2007-02-28 Thread Mario Ivankovits
Hi!
 document.getElementById('myId').click();

 the button defenition in JSF id classic :

 h:commandButton id=myId actionListener=#{myListener}
   
Are you really using just the same id for getElementById and the id
defined for the commandButton?
Its very unlikely that this works, though, should not work with IE too,
as the client id for a jsf comonent is prefixed with the ids of any
parent naming container.

Please double check that you use the correct javascript id by looking at
the generated html.
Anything else looks fine. Maybe have a look at [1] too.


Ciao,
Mario


[1] http://wiki.apache.org/myfaces/SubmitPageOnValueChange