NetTalk Central

Author Topic: DOCS:FileName needs to be changed to DOC::FileName ?  (Read 977 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
    • Email
DOCS:FileName needs to be changed to DOC::FileName ?
« on: May 18, 2023, 08:51:19 PM »
Hi
Copied in File Download example
All Ok except in the Global Declarations  DocumentBrowse  Value::Doc:Name Routine
Im getting a reoccuring error which I dont seem to be able to fix permanently.
which is:
packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.FormatValue(DOC::Name,'@s20')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),'ServeDocument?name=' & DOCS:FileName,'_blank',p_web.combine(p_web.site.style.BrowseHyperlinks,),loc:javascript,,0,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'DocumentBrowse'))

If I change this to DOC::FileName,  it compiles and runs Ok but the DOCS:FileName returns on subsquent recompiling...
The DCT prefix is DOC

How do I edit and fix permanently please?
Im trying to edit in the CLW file
Thanks
Regards,
Richard NT12.59
« Last Edit: May 18, 2023, 08:54:26 PM by Richard I »

Jane

  • Sr. Member
  • ****
  • Posts: 349
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: DOCS:FileName needs to be changed to DOC::FileName ?
« Reply #1 on: May 19, 2023, 08:37:10 AM »
?? I just clicked on web40.app in a fresh install of 12.59 and it compiles without error.

Generated code for me is
Code: [Select]
      packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.FormatValue(DOC:Name,'@s20')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),'ServeDocument?name=' & DOC:FileName,'_blank',p_web.combine(p_web.site.style.BrowseHyperlinks,),loc:javascript,,0,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'DocumentsBrowse'))
If you go into the browse properties, click on the DOC:Name field, then on the OnClick tab, is it entered incorrectly in the URL field?


Richard I

  • Sr. Member
  • ****
  • Posts: 381
    • View Profile
    • Email
Re: DOCS:FileName needs to be changed to DOC::FileName ?
« Reply #2 on: May 19, 2023, 01:24:15 PM »
Thank you Jane
Yes, that was it.
Appreciate your help.
Regards,
Richard