[Zope] Re[2]: [Zope] RSS and JavaScript

2001-01-08 Thread John Morton

On 8 Jan 2001 08:22:15 -0800 LARRY CHUON [EMAIL PROTECTED] wrote:

 Hi all,
 
 Thank you John for your quick reply to my previous email.  I've tried
 out both of your suggestions below.  It still does work.  I might have
 done something incorrectly as I am very new to these stuffs.  Here are
 the steps that I've taken:

I can't really tell you off the top of my head whether the javascript you
are using is correct - it could be that that is causing the problem.

 1) I create a file called openMe_js with JavaScript function. Then, I
 add it to the same dir as htmlPreview.  The function looks something like:

 script language="javascript"
 !--
 function openMe(URL){
 window.open(URL,"","toolbar,status,resizable,menubar");
 }
 //--
 /script

This bit looks ok.
 
 BTW, I've put this code directly in htmlPreview.

Right. Then you won't need to do any of the other steps. I expect the
problem is with the javascript itself. 

John




___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] RSS and JavaScript

2001-01-07 Thread John Morton

On 7 Jan 2001 17:51:24 -0800 LARRY CHUON [EMAIL PROTECTED] wrote:

 Hi Zopistas,
 
 Happy New Year!
 
 I'm working with SiteSummary and would like htmlPreview to grab the URL
 and open it up in a new window.  It's not working correct.  I'm unsure
 how Zope handle javascript either.

Zope handles javascript in the same way it handles html - it just sends
it to the client and let's the browser figure out what to do with it.
DTML, on the other hand, is interpreted beforehand, and the results are
sent to the browser. 

  Any help is greatly appreciated. 
 Below is my htmlPreview.  I also tried to put the javascript function
 (I'm new to js as well) in a file and import it to the same directory as
 standard_html_header.  Then I add SCRIPT LANGUAGE="JavaScript"
 SRC="openMe.js"/SCRIPT to stand_html_header.  That doesn't work
 either. By the way, js doesn't seen to work well in Zope.  I could n't
 find much info on-line.  

[cut]
 PA href="javascript:openMe('dtml-var url html_quote')"dtml-var linktext 
html_quote/A

My understanding of what happens when this link is traversed is that the
browser calls the javascript function 'openMe(...)', which should already
defined in the page. It doesn't attempt to fetch anything from the server
with that URL.

So what you need to do is ensure that htmlPreview include the function
openMe by either including the code into the html document like this:

script language="JavaScript"
dtml-var name="openMe_js"
/script

(note that I've replaced the dot in openMe.js with an underscore, as
objects with dots in there ids need to be quoted to be used, and 
1) I've forgotten how to do it
2) Searching through the documentation has given me a headache
)

...Or do what you did before:

SCRIPT LANGUAGE="JavaScript" SRC="dtml-var 
expr="openMe_js.absolute_url()""/SCRIPT

Use the absolute_url() method, so that the browser is sure of getting the
right url for the script (which may have been your problem before).

I'd use the first method as you can at least eyeball the html output of
htmlPreview and see if the openMe function has acutally been include,
before having to use whatever passes for javascript debugging in your
browser.

HTH,
John


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Splitting ZSQL results across pages

2000-08-10 Thread John Morton

I'd like to split the output of a ZSQL query across different instances of
a page in the same fashion as zope.org does with ZCatalog output, but I
can't for the life of me find any documentation on how it's done. Does
anyone know the magic incarntations or where the documents are?

Thanks,
John


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Re[2]: [Zope] Deleting folder-like objects.

2000-05-22 Thread John Morton

On Mon, 22 May 2000 04:54:26 -0600 you wrote:

[Deleteing folderlike objects doesn't invoke manage_beforeDelete for it's children]
   
Yeah, that can be annoying.
   
   Is there is any reason for it?
   
  
  None I can think of off hand...

Right. I'm going to consider it a bug and submit it to the collector as
soon as I can research a potential patch. 

John


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Zclass inheritence

2000-05-21 Thread John Morton

What does a product need to do in order to be a base class for a ZClass?
Can another Zclass act as a base class for a ZClass?
If not, why not?

John



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )