[Zope] thanks jonathan but problem remains.
Phillip Hutchings
sitharus at gmail.com
Sat Mar 5 16:35:27 EST 2005
On 4 Mar 2005 05:55:30 -0000, prabuddha ray <buddha_2001 at 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 at gmail.com / sitharus at sitharus.com
More information about the Zope
mailing list