javascript_howto thread: Problem: bad syncronizing in Javascript...
Hi, The problem occures within a commercial soloution, I am sorry I cannot show you any code. It is an advanced soloution which pushes the use of client based programming to the limit (over? Ofcause not! :-). Simply put: [SERVER PART] <=> [CLIENT SIDE] [CLIENT SIDE]: "APPLET" <=> "Javascript" <=> "DOM/DHTML" <=> User... The problem seems to occur when the Applet execuses some communication to/from the server. It seems to halt the javascript. This would not be a problem, if I could trust certain states of some DOM/DHTML properties. Example: a) JS: "Please change URL of an image" b) JS: "wait for the READYSTATE of the image to be "ready"" c) APPLET: Do some action... d) JS: "Done... Reset the URL of an image" YOU read it from a to d, right? So should the JS-script engine do, right? NO! It does not! The step "b" is "lying" - it says "the image is ready", but actually it is not rendered yet on the screen! My program might show a "please wait" message in "a" and then do the heavy Applet stuff after that. But in fact the "please wait" will never show! Reason: The applet is started before the readystate of the image is actually "ready" - JS supplies with me an false state in line "b"... :-/ Hope this explains the (rather) complex situation for which I ask for help :-) Cheers Mr. Sten Hougaard
|





