星期三, 1月 26, 2011

[ZK] comfirm in zk component

使用程式控制替元件加入comfirm javascript。
範例如下:
//removePhoto.setWidgetListener("onClick", "alert('test');");
removePhoto.setWidgetListener("onClick", "if(!confirm('Remove Your Picture?')){evt.stop({au:true});}");

A client-side event listener could stop the sending of a widget event to the server by invoking Event.stop(Map) with {au:true}, such as

evt.stop({au: true});

Reference:
ZK Client-side Reference/Notifications/Widget Events
ZK Client-side Reference/Communication/AU Requests/Client-side Firing

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails