[Zope] Zope and Javascript

Alan Snyder alan8373 at gmail.com
Wed Dec 22 15:11:39 EST 2004


do you need to replace the "<" with "&lt;" - i think i remember this
works inside javascript.


On Wed, 22 Dec 2004 13:07:22 -0700, Joe Goldthwaite
<joe at goldthwaites.com> wrote:
> I've run into a problem that spawned what is probably a stupid question.
> I'm probably doing something wrong here.
> 
> I've been using JavaScript to control some cookie functions.  I created a
> page template called cookies.js and then placed a link on the page that
> looks like this; '<script language="JavaScript" src="cookies.js"></script>'.
> This has worked well for months.  I was trying out a routine I found that
> uses Javascript to sort HTML tables on the browser side.  Following the same
> pattern, I created a page template called "sorttable.js" and pasted the
> sample code into it.  When I tried to save it, I got an invalid tag error on
> this line;
> 
>     for (ti=0;ti<tbls.length;ti++) {
> 
> Obviously it thinks the less than sign is the start of a tag.  I didn't run
> into this before because my cookie script doesn't have any less than or
> greater than signs.  Since java scripts are pretty integral to web
> development, I'm sure Zope must have some way of processing them.  I know I
> could put the script in an external file but that seems like it would be
> kind of kludgy.  There are lots of different object types available; python
> script, structured text, etc. but which one would you use to store a java
> script file?
> 
> Joe Goldthwaite
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


More information about the Zope mailing list