That's got it! Thanks. Bill
On 11/19/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
Without quotes the javascript interpreter will treat your sampleForm reference as being one to an object previously defined. I think you need to do something more like tapestry.form.cancel('sampleForm') to make it get treated as a string. On 11/19/06, Bill Holloway <[EMAIL PROTECTED]> wrote: > > I have a very simple setup to reproduce a bug here. Summary: > invoking tapestry.form.cancel from the onclick handler of a form's > button (any button) gives javascript error in FireFox that the form's > id is not defined; e.g., "sampleForm is not defined". Here's my > template: > > <html jwcid="@Shell" title="Dialog Test"> > <body jwcid="@Body"> > > <a jwcid="@DirectLink" listener="listener:showDialog" > async="ognl:true">Show Dialog</a> > > <br /><br /> > > <div jwcid="[EMAIL PROTECTED]" hidden="prop:dialogHidden" > backgroundColor="black" opacity="0.7"> > > <form jwcid="[EMAIL PROTECTED]" success="listener:doFormSubmit" > cancel="listener:doFormCancel" > updateComponents="ognl:{'DialogContent', 'sampleForm'}"> > > <input jwcid="@TextField" value="prop:someProp" /> > > <input type="button" value="Cancel" > onclick="tapestry.form.cancel(sampleForm);" /> > > <input jwcid="[EMAIL PROTECTED]" value="OK" /> > > </form> > > </div> > </body> > </html> > > > Use ((Dialog)getComponent("DialogContent")).show() and ...hide() in > the showDialog and doFormCancel methods. Clicking on the cancel > method results in no action and a message in Firefox's javascript > console that "sampleForm" is not defined. > > Cheers, > Bill > > -- > "Budgets are moral documents." > > -- Ann Richards > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- 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
-- "Budgets are moral documents." -- Ann Richards --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]