Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Relative or Absolute Linking to local network

Engaged ,
Dec 03, 2008 Dec 03, 2008
Hi. I am trying to put a link on a web page that we use internally at work using cold fusion to open a file that is on our internal network. I'm just wondering how I could get this work? What it's doing when I create an a href is it's doing a relative link, but I don't want that address to show up in the link. Is there a way to strip out that part of the address? I will not show the entire path, but just a little so you can understand what I'm talking about. I want just this to show in the address bar when I click the link: \\Server\Server_Folder\Sales What shows up instead for the link is: http://192.168.0.2....\\Server\Server_Folder\Sales
How do I get rid of the http://192.168.0.2...?
Can someone please help me? Thanks.

Andy
437
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2008 Dec 03, 2008
You could try a findnocase() to get the position of \\, then strip off
everthing before it

Steve

"jamie61880" <webforumsuser@macromedia.com> wrote in message
news:gh6qds$7p$1@forums.macromedia.com...
> Hi. I am trying to put a link on a web page that we use internally at work
> using cold fusion to open a file that is on our internal network. I'm just
> wondering how I could get this work? What it's doing when I create an a
> href is
> it's doing a relative link, but I don't want that address to show up in
> the
> link. Is there a way to strip out that part of the address? I will not
> show the
> entire path, but just a little so you can understand what I'm talking
> about. I
> want just this to show in the address bar when I click the link:
> \\Server\Server_Folder\Sales What shows up instead for the link is:
> http://192.168.0.2....\\Server\Server_Folder\Sales
> How do I get rid of the http://192.168.0.2...?
> Can someone please help me? Thanks.
>
> Andy
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 03, 2008 Dec 03, 2008
Steve,
Can you show me an example of how to use findnocase() and then how to strip things off? I don't understand how to use these. I looked at the help menu, but I don't understand it. Thanks.

Andy
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 03, 2008 Dec 03, 2008
I used something liker:

<!--- Find position of '@' in users email --->
<cfset stest=findnocase("@",#form.contactEmail#)>
<!--- Now find the '.' --->
<cfset etest=findnocase(".",#form.contactEmail#,stest)>
<!--- Take everything inbetween the two, 1 is added to stest to get 1 space
past the @, and same for etest, get prior to '.' --->
<cfset
email_test=trim(mid(#form.contactEmail#,(stest+1),((etest-1)-stest)))>

Steve

"jamie61880" <webforumsuser@macromedia.com> wrote in message
news:gh6svv$38k$1@forums.macromedia.com...
> Steve,
> Can you show me an example of how to use findnocase() and then how
> to
> strip things off? I don't understand how to use these. I looked at the
> help
> menu, but I don't understand it. Thanks.
>
> Andy
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 03, 2008 Dec 03, 2008
LATEST
Hi,

What you are looking for may not be possible.

Your server is sending a html page back to the users browser with a link. If you click the link, it needs to tell the browser from where to get the file.
http://WhichServer/WhichFolder/WhatsTheFilename.Extension

If you do not provide the WhichServer information to the browser, how should it know where to get the file?

There are 2 things you can do:
1) Masking
The link in your page could open another page on your server that actually opens the file via javascript
=> adds occasional problems, and still not totally secure
(google for: javascript window.open)
2) Tunneling
For this, you have to create CF scripts on your server that would get the file from your network servers, and then would provide a temporary link to the customer where they can download it
(google for: cfcontent)

cheers,
fober
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources