Hi, I just started playing with Zope, and noticed that TALES seemed to be the preferred way to do HTML presentation. The way I had my site set up before that using DTML methods. I had a dtml method for my header, a dtml method for my footer, and then the index_html called those two methods, and put some data between them. My problem is that I tried to switch all of those pieces over to TALES, and while it worked for the header, as soon as I changed the footer, it gave me an error. It looks like TALES checks to make sure that every closing tag has an opening one, but not the other way around. Am I using TALES incorrectly? Should I instead be using DTML Methods or Documents for this purpose? Thanks in advance for any help you can give. ________________________________________________________________________ Mike Barrett | "I used to read, now I go to raves." mike@daboyz.org | -- Random MUNI Rider, speaking www.daboyz.org | to my friend Allison. ------------------------+-----------------------------------------------
Am I using TALES incorrectly? Should I instead be using DTML Methods or Documents for this purpose?
Yes, no. Have a look at METAL, http://www.zope.org/Members/tone/METAL /Magnus
I don't know why M$ want to make the javascript function "escape/unescape" in IE behaves different from "url_quote". It seems that what "unicode" capability of IE just brings "trouble" to me! And the even worse problem is that there seems no "chr" function to convert ascii code to ascii charecter in javascript. (Am I wrong? hope I am) The problem is that I can't pass binary string from server by "url_quote" and decode it in the broswer by "unescape". My questions: 1) Is there any zope object can be used to encode string in "javascript" way in the server side? 2) Or I missed something that there is function of javascript which can decode "url_quote" string in the client side? Thanks a lot. Iap, Singuan
iap@y2fun.com writes:
... The problem is that I can't pass binary string from server by "url_quote" and decode it in the broswer by "unescape".
My questions: 1) Is there any zope object can be used to encode string in "javascript" way in the server side? Python's and JavaScript's quoting rules for strings are similar. Therefore, "repr" may be sufficient.
2) Or I missed something that there is function of javascript which can decode "url_quote" string in the client side? When you know that a string is generated for Javascript interpretation, why do you want to "url_quote" it?
While the old URL standard specified that each non-ascii latin-1 character is replaced by "%XX" where "XX" are the two hex digits representing the character code (this obviously is insufficient for non-western languages), the new standard recommends to first encode the string as UTF-8 and then apply the old URL encoding to the resulting sequence of bytes. It may well be that the Javascript "unescape" expects this coding. Dieter
participants (4)
-
Dieter Maurer -
iap@y2fun.com -
Magnus Heino -
Mike Barrett