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.
精彩评论