[Zope-dev] A simply question for help?

Jim Fulton jim@digicool.com
Sat, 11 Dec 1999 18:00:45 +0000


Victor.Zhai@ogilvy.com wrote:
> 
> Hi,all
>      I want to display a new sub windows when click the following hyper
> link:
> 
> <a href="#" onClick="window.open('<dtml-var absolute_url>/viewInfo>','','scrollbars=yes,width=640,height=430')"><dtml-var jobtitle></a>


Minor note, with the new syntax, the following would be better:

  <a href="#" 
   onClick="window.open('&dtml-absolute_url;/viewInfo>','','scrollbars=yes,width=640,height=430')">
   <dtml-var jobtitle></a>

Or, with 2.1, you could even use:

  <a href="#" 
   onClick="window.open('&dtml.url-viewInfo;','','scrollbars=yes,width=640,height=430')">
   <dtml-var jobtitle></a>

This version inserts the absolute URL (because of the '.url' 
in the dtml entity reference) of viewInfo.  This works even if called
from a sub-folder of the folder containing viewInfo.  


>    But you know that <dtml-var absolute_url> is like http://www.mydomain.com/object... ,
> And it is not a physical web page.

What difference does this make.

It *is* a web page that is as physical as any other.
Javascript can't tell that it isn't a simple file.

> How can I realize this? Give me some advice.

Doesn't the above code work?

It should.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (888) 344-4332              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.