开发者

c# waiting for a javascript event to finish

what i like to do is this: in a button object in asp.net c# I want to read some hidden fields filled by javascript with client browsers data. the function in js if fire when the client push the button but sometimes when in c# I'm reading the hidden fields the js hasn't finish yet so I get the hidden blank. what I need to do is somehow start reading in c# when the js function is done.

thank开发者_开发技巧s in advance, any idea would be helpfull


Just prevent the button postback from occurring until the javascript is finished.

This is a simple separation of client-side vs. server-side processing.


Use a callback function from client to server, signaling the server, that the client is done updating. After that, the server can read the values.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜