There may be ways of doing this directly in zpts (I think Evan Simpson may have posted something about this before), but when I got to this problem, I just put the javascript into a dtml method then inserted it into the page template. tim ----- Original Message ----- From: Pedro Beck Gomes da Costa To: zope@zope.org Sent: Wednesday, October 02, 2002 11:29 AM Subject: [Zope] ZPT changing javascript (HOW?) - Easy with DTML Hi! I recently decided to change all my coding from dtml to page templates, but I now have a problem i cant solve. I need to change the javascript on html script blocks. A quick example in DTML of what i want to do and that works perfectly: <HTML> <HEAD> <TITLE>Chat</TITLE> <SCRIPT type="text/javascript"> function connect() { username = <dtml-var "USER_NAME">; password = <dtml-var "USER_NAME">; server = <dtml-var "USER_NAME">; port = <dtml-var "USER_NAME">; subRoomID = <dtml-var "USER_NAME">; groupID = <dtml-var "USER_NAME">; WBChat.Connect2(server,port,subRoomID,username,password,groupID); } </SCRIPT> </HEAD> <BODY> <!-- BODY HERE --> </BODY> </HTML> Someone can help me on how to di this with ZPT?? Thanks in advance, Pedro Costa