0

pass data from client side to server side by javascript

asked 2018-09-28 16:17:48 +0800

xuesong gravatar image xuesong
101 2

zAu.send(new zk.Event(zk("$btnSaveCustom").$(),"onClick",{a:1},{toServer:true})); 通过这种方式,getData()取不到数据

delete flag offensive retag edit

Comments

event.getData() is null now.

xuesong ( 2018-10-08 09:03:47 +0800 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2018-10-09 09:09:28 +0800

hawk gravatar image hawk
3205 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2018-10-09 09:10:43 +0800

The event name should be a custom event name like onMyEvent so that ZK will send your data object to the server. If you send a built-in event name like onClick, ZK will just send standard data instead of your custom data.

link publish delete flag offensive edit
0

answered 2018-10-08 09:03:02 +0800

xuesong gravatar image xuesong
101 2

but event.getData() is null now.

link publish delete flag offensive edit
0

answered 2018-10-04 09:29:47 +0800

hawk gravatar image hawk
3205 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2018-10-04 09:30:31 +0800

I think you need to get the data by ((JSONObject)event.getData()).get("a") You can read Fire event directly to server and the example project at the Github.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2018-09-28 16:17:48 +0800

Seen: 16 times

Last updated: Oct 09 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More