jonathan sir , thanks for that detailed solution. but i guess my problem was simpler. i cudnt explain it properly . I've to rebuilt a login page in zope which i'd developed in asp. I'd used javascript to do wat u've mentioned in 3rd soln. but the javascript is not at all being executed in zope. This is wat i wanted : as soon as i select a district from a combobox the corresponding user list in next combobox sud appear.the data are being fetched from Mysql using the ZSQL queries. AND CAN WE ANYWAY USE JAVASCRIPT IN DTML DOCUMENTS. please tell me the soln in ZOPE.
Am Freitag, den 04.03.2005, 05:55 +0000 schrieb prabuddha ray:
jonathan sir , thanks for that detailed solution. but i guess my problem was simpler. i cudnt explain it properly .
I've to rebuilt a login page in zope which i'd developed in asp. I'd used javascript to do wat u've mentioned in 3rd soln. but the javascript is not at all being executed in zope. This is wat i wanted : as soon as i select a district from a combobox the corresponding user list in next combobox sud appear.the data are being fetched from Mysql using the ZSQL queries.
AND CAN WE ANYWAY USE JAVASCRIPT IN DTML DOCUMENTS.
You can use as many javascript as you want in DTML or ZPT documents - zope will ignore them and just deliver them to the client. Its up to the client to interprete them. In ASP you can have serverside javascript, but there is not much gain from it - you can do the same with the default server side language, which in case of Zope is Python. Use a network sniffer tool with a typical request/response to learn how the things work. Regards Tino
On 4 Mar 2005 05:55:30 -0000, prabuddha ray <buddha_2001@rediffmail.com> wrote:
jonathan sir , thanks for that detailed solution. but i guess my problem was simpler. i cudnt explain it properly .
I've to rebuilt a login page in zope which i'd developed in asp. I'd used javascript to do wat u've mentioned in 3rd soln. but the javascript is not at all being executed in zope. This is wat i wanted : as soon as i select a district from a combobox the corresponding user list in next combobox sud appear.the data are being fetched from Mysql using the ZSQL queries.
AND CAN WE ANYWAY USE JAVASCRIPT IN DTML DOCUMENTS.
You can put JavaScript in them, but you can't execute it on the server. You are quite confused as to what ASP was doing. While it looks like the JavaScript code was calling a SQL method, behind the scenes ASP (or Visual Studio) does a lot of work to make it work. You can use server-side JavaScript with ASP, to further confuse the matter, but there's a lot of code hidden from the programmer that makes the whole thing work. Basically, in HTTP all the server can do is send a document. There is NO LIVE INTERACTION between the client and server, a request comes in, HTML goes out, End. Anything that looks like interaction has to be faked in. JavaScript - which runs on the browser - CANNOT call DTML, and DTML, which runs on the server, CANNOT call JavaScript. You have a few options: You can put all the users for every district in the HTML you return as a JavaScript array. You can refresh the page by automatically submitting the form and outputting the users from a DTML method. You can put an invisible IFRAME on the page and request the data through an HTTP request in there and parse it out. Or you can use the JavaScript XML request functions like Gmail does. -- Phillip Hutchings http://www.sitharus.com/ sitharus@gmail.com / sitharus@sitharus.com
participants (3)
-
Phillip Hutchings -
prabuddha ray -
Tino Wildenhain