Re: t5: calling action link from a javascript

2009-10-12 Thread Toby Hobson
You may get away with using an expansion as explained here: http://wiki.apache.org/tapestry/Tapestry5HowToIncludeJavaScript but I think RenderSupport is still the better option 2009/10/12 Toby Hobson > You can't really rely on Tapestry expansions inside JS code ... it's best > to use the RenderS

Re: t5: calling action link from a javascript

2009-10-12 Thread Toby Hobson
You can't really rely on Tapestry expansions inside JS code ... it's best to use the RenderSupport to pass data to the Javascript. You may find this wiki post helpful: http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained 2009/10/12 Angelo Chen > > Hi Toby, > > It got called in the fir

Re: t5: calling action link from a javascript

2009-10-11 Thread Angelo Chen
Hi Toby, It got called in the firefox but not in safari, here is what I do: in the .tml file: < script type="text/javascript"> function updateItem() { return "${updateItem}"; } in the .js file: jQuery.post(updateItem(), { item_no : ino }, function(data){

Re: t5: calling action link from a javascript

2009-10-11 Thread Toby Hobson
Are you sure you're javascript is using the correct url? I don't know what your updateItem() JS function does, but generally you need to construct the actionlink url (as you have done) then pass this to the javascript using RenderSupport's addScript() method Toby 2009/10/12 Angelo Chen > > Hi,

t5: calling action link from a javascript

2009-10-11 Thread Angelo Chen
Hi, I'm trying to call an actionlink from a javascript, but i'm getting: Remote server closed the connection before sending response header and I never see the pop up dialog in the javascript, any idea how to avoid errors like this? Thanks. A.C. sample code: in java: public String getUpdat