You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by DH <ni...@gmail.com> on 2009/10/12 03:51:43 UTC
Re: calling action link from a javascript
updateItem()?
I think should be ${updateItem()}.
DH
http://www.gaonline.com.cn
----- Original Message -----
From: "Angelo Chen" <an...@yahoo.com.hk>
To: <us...@tapestry.apache.org>
Sent: Monday, October 12, 2009 9:40 AM
Subject: t5: calling action link from a javascript
>
> 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 getUpdateItem() {
> return resources.createActionLink("updateItem", false).toURI()
> }
>
>
> Object onUpdateItem() {
> return new TextStreamResponse("text/html", "ok");
> }
>
> in javascript:
>
> jQuery.post(updateItem(), { item_no : ino }, function(data){
> alert("Data Loaded: " + data);
> });
> --
> View this message in context: http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>