Hello, Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded. (for more information see http://www.ashleyit.com/rs/) The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox. The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse). Has anyone done such a thing with Zope, in stead of a java-servlet? Cheers, René Olsthoorn, Mediasystemen, The Netherlands.
(Please no HTML posting) On Tue, 14 Aug 2001, [iso-8859-1] RenИ Olsthoorn wrote:
Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded. (for more information see http://www.ashleyit.com/rs/)
The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox. The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse).
Has anyone done such a thing with Zope, in stead of a java-servlet?
http://openthought.net/ It is not yet Zope or even Python related, but there are chances it will be. Python is mentioned on the first page. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
Remote scripting?Macromedia Flash5 with XML enabled could be another candidate for this kind of implementation. And I believe it's a better choice than the java applet in most of the case at least for me. Zope regards the server-side, there is nothing zope can do for the client-side computing except for establishing its environment (carries the material for the client-side components) Iap, Singuan ----- Original Message ----- From: René Olsthoorn To: 'zope@zope.org' Sent: Tuesday, August 14, 2001 5:43 PM Subject: [Zope] Remote scripting? Hello, Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded. (for more information see http://www.ashleyit.com/rs/) The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox. The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse). Has anyone done such a thing with Zope, in stead of a java-servlet? Cheers, René Olsthoorn, Mediasystemen, The Netherlands.
Remote scripting?I'm confused by Zope namespaces. I'm trying to open a DTML document from a DTML method. The hierarchy is : Members/Staff/ADocument Info/Calendar/calendar.dtml That is, my DTML method is calendar.dtml and the document I wish to open is ADocument. How do I go about doing this? I want to get the contents of ADocument into a Python vector where it's split by it's newlines. I've tried : <dtml-let docContents=="_.string.split(ADocument.raw,'\n')"
but that obviously doesn't work because I don't have Members/Staff in the namespace stack. I've read the DTML doc in the Zope book but it didn't have examples like this -- that is, opening arbitrary locations in the hierarchy. Thanks.
Members/Staff/ADocument Info/Calendar/calendar.dtml
That is, my DTML method is calendar.dtml and the document I wish to open is ADocument. How do I go about doing this? I want to get the contents of ADocument into a Python vector where it's split by it's newlines. I've tried :
<untested> <dtml-let docContents=="_.string.split(Members.Staff.ADocument.data,'\n')"> </untested>
Frank McGeough wrote:
Remote scripting?I'm confused by Zope namespaces. I'm trying to open a DTML document from a DTML method. The hierarchy is :
Members/Staff/ADocument Info/Calendar/calendar.dtml
That is, my DTML method is calendar.dtml and the document I wish to open is ADocument. How do I go about doing this? I want to get the contents of ADocument into a Python vector where it's split by it's newlines. I've tried :
<dtml-let docContents=="_.string.split(ADocument.raw,'\n')"
but that obviously doesn't work because I don't have Members/Staff in the namespace stack. I've read the DTML doc in the Zope book but it didn't have examples like this -- that is, opening arbitrary locations in the hierarchy.
Thanks.
<dtml-let docContents=="_.string.split(Members.Staff.ADocument.document_src(),'\n')"> Objects in folders act like attributes of the folder object, and therefore may be accessed using the Python dot operator in expressions. You can also add objects to the namespace using dtml-with. hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Hi René, please dont send HTML to a list! To your problem: Whatever a server can send can be send with zope as well. (Ok, multipart documents are another thing, but IE does not work with them anyway) The scripting basically calls a page on the server which is provided via scripting. There can ba a CGI or whatever script. The whole conversation looks like this: GET /rs/jsrs/select/select_rs.asp?C=jsrs1&F=modelList&P0=[4]&U=997788891480 HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, */* Referer: http://www.ashleyit.com/rs/jsrs/select/select.asp Accept-Language: de,en;q=0.5 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) Host: www.ashleyit.com Connection: Keep-Alive Cookie: ASPSESSIONIDQQQGGGCS=IDLLAEGAEPFFEAOFPKJECGNG HTTP/1.1 200 OK Server: Microsoft-IIS/4.0 Date: Tue, 14 Aug 2001 11:36:10 GMT Content-Type: text/html Expires: Tue, 14 Aug 2001 11:36:10 GMT Cache-control: private Transfer-Encoding: chunked df <html><head></head><body onload="p=document.layers?parentLayer:window.parent;p.jsrsLoaded('jsrs1');">jsrsPayload:<br><fo rm name="jsrs_Form"><textarea name="jsrs_Payload">10~Elantra|11~Sonata|</textarea></form></body></html> 0 So your script on zope side (ideally a Python Script) has to produce a <textarea> with the elements in it. This gets parsed by the script in the browser. While this is a nice mechanism you schould really think about if it is really a plus for your application. There are several riscs connected to this solution. One important is that the browsers must be recognized by the script. This is really a weak point in it. Imagine users with browsers which could in theory use the script, but are not recogniced. The other thing is with people without scripting enabled because of serious security concerns. I think a form with all elements and a supporting JavaScript can be helpful. But without scripting, the page schould at least be useable. Regards Tino --On Dienstag, 14. August 2001 11:43 +0200 René Olsthoorn <rol@mediasys.nl> wrote:
Hello,
Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded.
(for more information see http://www.ashleyit.com/rs/)
The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox.
The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse).
Has anyone done such a thing with Zope, in stead of a java-servlet?
Cheers, René Olsthoorn, Mediasystemen, The Netherlands.
Hi René, I followed examples in the book "Core Web Programming" by Marty Hall to make a java applet that talks to my Zope server. It's been a long time since I've looked at the code, but in a nutshell, the Java Applet does the following: 1. Create a URL object that points to the DTML Method or Script that will handle the request 2. Create a Connection object 3. Open the connection 4. Create a PrintStream object for sending the request to the server 5. Send the request to the server (I used println()) 6. Close the output 7. Create a DataInputStream object to receive Zope's response 8. Read in Zope's data (I used readLine()) 9. Close the input stream 10. Process the data that Zope sent 11. Rinse, repeat All my applet does is redirect based on what Zope sends back to it, but it would be easy enough to repopulate a list box with Zope data. Hope that helps, Eric. PS, it's considered good form to send only "plain text" messages to the mailing list. -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of René Olsthoorn Sent: Tuesday, August 14, 2001 2:44 AM To: 'zope@zope.org' Subject: [Zope] Remote scripting? Hello, Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded. (for more information see http://www.ashleyit.com/rs/) The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox. The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse). Has anyone done such a thing with Zope, in stead of a java-servlet? Cheers, René Olsthoorn, Mediasystemen, The Netherlands.
Remote scripting?You might want to take a look at KnowNow (http://www.knownow.com) as well, it has a JavaScript 'microserver'. There is also a Python Microserver, available from www.zope.co.uk/pyKnowNow. It works well, I'm the creator/author of the Python Microserver, and I'm going to be integrating it with Zope as soon as I get around to it. I'll probably create a bunch of products for publishing/subscribing to a KnowNow router from Zope on the server side and then use the JavaScript microserver on the client side. Any questions, mail me. Phil ----- Original Message ----- From: René Olsthoorn To: 'zope@zope.org' Sent: Tuesday, August 14, 2001 10:43 AM Subject: [Zope] Remote scripting? Hello, Remote Scripting means: calling server-side code from a client-side script without causing the active page to be reloaded. (for more information see http://www.ashleyit.com/rs/) The website mentioned above contains an HTML page which contains two comboboxes. The choices offered in the second combobox are calculated on the server, depending on the choice that the user makes in the first combobox. The values of the second combobox are retrieved from the server by communicating with a java-servlet, and all this is done without reloading the active page. (using DHTML, ofcourse). Has anyone done such a thing with Zope, in stead of a java-servlet? Cheers, René Olsthoorn, Mediasystemen, The Netherlands.
participants (9)
-
Casey Duncan -
Eric Walstad -
Frank McGeough -
iap@y2fun.com -
Oleg Broytmann -
Peter Bengtsson -
Phil Harris -
René Olsthoorn -
Tino Wildenhain