Bill
The other reason you need to use ..Link() is to allow for browsers that
don't accept cookies...

It is easy to forget, because CSP automatically deals with most urls
that it can recognize in the source.

I've never really seen much point in using the Encoded option for pages.
I do however make extensive use of Private pages.  

In fact, I sub-class %CSP.Page and override the Private parameter so
that it is set to 1 by default.  That way, public pages  have to be
declared explictly with <csp:class private="0"/>.  

Not only is this both good documentation and good security, it also
guarantees that your application will work with browsers that don't
accept cookies.

Regards
George

George James Software
Cach� Tools, Training, Technology
www.georgejames.com
+44-1932-252568




> -----Original Message-----
> From: Bill McCormick [mailto:[EMAIL PROTECTED] 
> Posted At: 19 July 2004 19:40
> Posted To: Cach� Newsgroup
> Conversation: how to call a routine in a csp page?
> Subject: Re: how to call a routine in a csp page?
> 
> 
> Thanks George. I always forget ..Link() because I tend to not use 
> Private or Encoded pages so I don't get URL issues. Excellent point.
> 
> George James wrote:
> > Ummm...
> > #(...)# will invoke the routine before the page is served 
> up, and the 
> > value returned will be the value of the hyperlink.  If this is what 
> > you really want to do then the correct syntax should be: <a 
> > href="#(..Link($$Linetag^foo))#"> (Bill will explain why)
> > 
> > But you probably actually want to invoke the routine when the user 
> > clicks the hyperlink in the page.
> > 
> > There are two ways to do this:
> > 
> > (a) Call another csp page:
> > 
> > <a href="MyPage.csp">
> > 
> > and then have the OnPreHTTP method of MyPage.csp call the routine, 
> > like
> > this:
> > 
> > <script
> >  language="cache"
> >  method="OnPreHTTP"
> >  arguments="" 
> >  returntype="%Library.Boolean">
> >     d Linetag^foo
> >     q 1
> > </script>
> > 
> > or (b) use a hyperevent:
> > 
> > <a href="javascript:void #server(..someClassMethod())#">
> > or
> > <a href="javascript:void #call(..someClassMethod())#;void "> 
> > and then include the method in the same csp page as the 
> #server call.
> > 
> > <script
> >  language="cache"
> >  method="someClassMethod" 
> >  arguments=""> 
> >     d Linetag^foo
> > </script>
> > 
> > If your routine returns a value that you want to get back to the 
> > browser then that's an additional question (please ask).
> > 
> > Regards
> > George
> > 
> > George James Software
> > Umlanji - Model your Cach� Classes
> > www.georgejames.com
> > +44-1932-252568
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >>-----Original Message-----
> >>From: Bill McCormick [mailto:[EMAIL PROTECTED]
> >>Posted At: 19 July 2004 16:06
> >>Posted To: Cach� Newsgroup
> >>Conversation: how to call a routine in a csp page?
> >>Subject: Re: how to call a routine in a csp page?
> >>
> >>
> >>Ferry wrote:
> >>
> >>>Hello is it possible to call a routine from a link in a csp page I
> >>>mean somthing like <a href="#(D ^Routine)#">
> >>>
> >>>Thanks in advance,
> >>>Ferry
> >>>
> >>>
> >>
> >><a href="#($$Linetag^foo)#">
> >>
> > 
> 


Reply via email to