NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alan Cochran on July 05, 2007, 07:35:15 PM

Title: File Hyperlink on a Browse
Post by: Alan Cochran on July 05, 2007, 07:35:15 PM
I am wanting to have a hyperlink on a Browse to launch a PDF file.  I noticed there is an checkbox option "Field contains File Name" but it is disabled.  If this feature not available in version 4.26 yet?  If not, is there a workaround to allow for this?

Thanks...
Alan
Title: Re: File Hyperlink on a Browse
Post by: Bruce on July 06, 2007, 03:56:01 AM
Hi Alan,

That prompt was there to link to "local" files. However it turns out this is behavior not allowed by modern browsers. (ie it won't link to a file:// from inside a http:// ). So I've removed the prompt in 4.27.

However as long as your files are on the server, this isn't a problem.
Remembering that static files can _only_ be served from below the "web" folder, simply set the URL.

For example (and I'm not sure what you have in your file) but let's say you have a field, and it contains a web-relative filename.
cus:logo = 'images\frank.png'


then you can just tick on "Field contains URL".

What if the field contains more than that...
cus:logo = 'c:\server\web\images\frank.png'
then you'd need version 4.27 which simplifies this to
'images\frank.png'
for you.

What if the file is _outside_ the web folder?
In that case you have 2 options.
a) move the file _inside_ the web folder or
b) tweak the server to allow it to serve static files _outside_ the web folder. I really, really, don't recommend this though.

Cheers
Bruce
Title: Re: File Hyperlink on a Browse
Post by: Alan Cochran on July 06, 2007, 04:19:58 AM
Hi Bruce.

Is 4.27 available yet?

Alan
Title: Re: File Hyperlink on a Browse
Post by: kevin plummer on July 06, 2007, 04:38:32 AM
or c) copy the file from its original location to below web and put $$$ in front of it and serve it up. This is actually very quick and effective and $$$ files are cleaned up automatically...
Title: Re: File Hyperlink on a Browse
Post by: Bruce on July 06, 2007, 11:27:54 AM
Alan,

>> Is 4.27 available yet ?

Probably <g>...
Last thing I did before leaving the office was set the build in motion. If it all went through smoothly, then the update should be on the web site.

Cheers
Bruce
Title: Re: File Hyperlink on a Browse
Post by: lanmicro on July 07, 2007, 08:58:15 AM
Kevin,

Are you copying the files to the $$$ prefix from within your web app?  Some additional details would be appreciated.