Hi to all, im looking for a way to handle the html-events like ondblclick or onfocus, without using java or javascript. Is there a way in callin python-functions? with regards Axel
----- Original Message ----- From: "Axel Missbach" <Axel.Missbach@t-online.de> Sent: Saturday, February 10, 2001 7:48 AM
Hi to all,
im looking for a way to handle the html-events like ondblclick or onfocus, without using java or javascript. Is there a way in callin python-functions?
with regards
Axel
Not likely unless you use a special, scriptable/programmable browser (ie not Netscape or IE, if you do not want to use JavaScript). The problem lies in that these events are user interface events, that have to be handled by the client-side (the browser). JavaScript and any of the language Plug-Ins (java, tcl, etc) are used for client-side scripting. While it is possible to have a minimum set of client-side scripting, for example using very short, generic javascript snippets to call methods on the server and the return the results to the client, the client-server latency would probably render it useless (on the client side *ANY* latency in interface elements is to be avoided). It might work acceptably in a LAN enviroment where you have near-zero latency but in a more generic Internet scenario, I guess it would be impossible to use. I suggest that you reconsider your situation in the following ways: 1) what are you trying to accomplish? If it is an advanced user interface, why not use JavaScript? It is always present in any decently recent browser, and while there are browser specific issues, my guess is that it is not too hard to write browser independent JS code. 2) If your problem is that you much rather use Python to code you UI code in, I suggest that it will be harder to maintain such code. Assuming that it is possible to use Python to code onMouseDown etc, it would probably have to done using some sort of browser plug-in, which means that you need to make sure that every one of your users have the Python plug-in installed. This might prove to be very difficult and a support nightmare (this goes for any other language plugin as well. Tcl/Tk comes mind as an alternative to Java). 3) If you have very, very advanced UI needs, is it possibe to satisy them by employing clever usage of JS/HTML? If not, perhaps you should consider using a separate client talking to the server with XML-RPC, using any RAD language like Java, Tcl/TK, VisualBasic, REALBasic, or using python with GUI libraries. In a windows only client enviroment, you might be able to use VisualBsic on IE (I am merely guessing here, mind you). The bottom line is that I think that JavaScript may very well be the best solution available to you, even if JavaScript is sucky at times. I would not use Java for browser GUI building; I consider it better to use a standalone Java app if you really need to use Java. As for other languages on the client side, you have to consider how you are going to distribute plugins, etc to your users. I hope my comments are of some help to you. In an Ideal World, Mozille would be an alternative, but, alas, it is not even beta quality yet :-) Sincerely, /dario - -------------------------------------------------------------------- Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology dario@ita.chalmers.se ICQ will yield no hits IT Systems & Services
participants (2)
-
Axel.Missbach@t-online.de -
Dario Lopez-K�sten