Loading ...
Sorry, an error occurred while loading the content.

Hyperlink to local index.html

Expand Messages
  • R Shapp
    Hi Group, Within an Outline document, I want to provide a hyperlink to an HTML page on my local C drive at C: test index.html. I want index.html to open in my
    Message 1 of 14 , Dec 7, 2003
    • 0 Attachment
      Hi Group,

      Within an Outline document, I want to provide a hyperlink to an HTML page on
      my local C drive at C:\test\index.html. I want index.html to open in my
      default browser just as if I had navigated to C:\test\index.html and double
      clicked on it.

      I've read Help, and I've tried about nine permutations of naming the
      destination with and without enclosing square brackets and/or double quotes,
      and some other ideas too. I keep getting one of three undesirable results:
      1. The index.html page opens in NT for editing the HTML source code.
      2. My browser opens displaying whatever the most recent web page was.
      3. An error message tells me that NT was unable to find the target in the
      folder where the Outline resides. (Outline document and index.html ARE in
      separate folders.)

      There must be a simple way to link from an Outline document to an HTML page
      without resorting to the use of a clip. Please tell me what it is.

      Thanks for the help.

      Ray Shapp
      NTPro 4.95
      WinXP Home
      MSOE v8
    • loro
      ... Not *every* browser supports the file protocol (I think it was a IE thing to start with?) but current major ones do. If it s just for your own use you
      Message 2 of 14 , Dec 7, 2003
      • 0 Attachment
        At 12:38 2003-12-07, R Shapp wrote:
        >Within an Outline document, I want to provide a hyperlink to an HTML page on
        >my local C drive at C:\test\index.html. I want index.html to open in my
        >default browser just as if I had navigated to C:\test\index.html and double
        >clicked on it.

        Not *every* browser supports the file "protocol" (I think it was a IE thing to start with?) but current major ones do. If it's just for your own use you can just test if it works.

        file:///c:\test\index.html

        You may have to urlencode spaces in directory names.

        Lotta
      • melchior prisi
        Hi, ... Or like this: file:///c|/test/index.htm Use ^$filetourl(c: test index.htm)$ to convert paths. Regards, Melchior -- http://orp.alphazwirbel.net/
        Message 3 of 14 , Dec 7, 2003
        • 0 Attachment
          Hi,

          loro wrote:
          > Not *every* browser supports the file "protocol" (I think it was a IE thing to start with?) but current major ones do. If it's just for your own use you can just test if it works.
          >
          > file:///c:\test\index.html
          >
          > You may have to urlencode spaces in directory names.

          Or like this:
          file:///c|/test/index.htm

          Use ^$filetourl(c:\test\index.htm)$ to convert paths.


          Regards,
          Melchior

          --
          http://orp.alphazwirbel.net/
        • R Shapp
          Hi Lotta and Melchior, file:///c|/test/index.htm did not work. It just opened the browser displaying the most recent web page. file:///c: test index.html
          Message 4 of 14 , Dec 7, 2003
          • 0 Attachment
            Hi Lotta and Melchior,

            file:///c|/test/index.htm did not work. It just opened the browser displaying
            the most recent web page.

            file:///c:\test\index.html works correctly! Of course, your solution had to
            be enclosed in square brackets, but it does work.

            I am puzzled to see both forward and backward slants in the same hyperlink.
            Where does the file:/// get discussed in Help?

            <<You may have to urlencode spaces in directory names>>

            Does that mean coding spaces as "%20" as in
            file:///c:\folder%20name\index.html ?

            I tried file:///c:\second test\index.html without the "%20" and that worked
            also.

            Many thanks to you both for your help

            Ray Shapp
          • loro
            ... Odd. I don t use brackets. But then c: test index.html works too here. Without brackets that is. With brackets it opens in Notetab. ... Don t know if it
            Message 5 of 14 , Dec 7, 2003
            • 0 Attachment
              >file:///c:\test\index.html works correctly! Of course, your solution had to
              >be enclosed in square brackets, but it does work.

              Odd. I don't use brackets. But then c:\test\index.html works too here. Without brackets that is. With brackets it opens in Notetab.

              >Where does the file:/// get discussed in Help?

              Don't know if it does. It isn't a "Notetab thing".

              ><<You may have to urlencode spaces in directory names>>
              >
              >Does that mean coding spaces as "%20" as in
              >file:///c:\folder%20name\index.html ?

              Yes. Maybe it depends on OS? I have to write ...\Documents%20and%Settings\My%20Docouments\... Ewww!

              Lotta
            • melchior prisi
              Hi Lotta, Ray, ... It seems to depend to the browser you use. For Mozilla (1.4.1): NO [file:///c: test index.html] NO [file:///c: test index.html] YES
              Message 6 of 14 , Dec 7, 2003
              • 0 Attachment
                Hi Lotta, Ray,

                loro wrote:
                > Maybe it depends on OS? I have to write ...\Documents%20and%Settings\My%20Docouments\... Ewww!

                It seems to depend to the browser you use.

                For Mozilla (1.4.1):

                NO [file:///c:\test\index.html]
                NO [file:///c:\test\index.html]
                YES [file:///c|/test/index.htm]
                YES [file:///C:/test/index.htm]

                For short:
                Drag your file to the browser, then copy the content of
                the address field to your otl.
                This should always work.

                Regards,
                Melchior

                --
                http://orp.alphazwirbel.net/
              • loro
                ... Melchior, I think I love you!!! I spent the better part of a day looking for a function that could urlencode a year or so ago. Since there is
                Message 7 of 14 , Dec 7, 2003
                • 0 Attachment
                  melchior prisi wrote:
                  >Or like this:
                  >file:///c|/test/index.htm
                  >
                  >Use ^$filetourl(c:\test\index.htm)$ to convert paths.

                  Melchior, I think I love you!!! I spent the better part of a day looking for a function that could urlencode a year or so ago. Since there is ^$StrURLDecode$ I thought there ought to be a way to urlencode a string too. I never realized that ^$filetourl()$ does that... thought it just flipped the slashed over and added file:/// (ok, I'm stupid). One can feed it something like & " and it returns %26%20%22 ... it doesn't even add the file:/// bit if the string doesn't start with c:. Not as elegant as a string function would be but way better than looking it up! Thanks for making me think. :-)))

                  BTW Your version, file:///c|test/index.htm, works fine here too. I fear Ray's machine is screwed up. ;-)

                  Lotta
                • loro
                  ... I meant the urlencoding of spaces. ... You are right. I just pasted it in the address field and that works. I never tried setting Moz (or Opera) as default
                  Message 8 of 14 , Dec 7, 2003
                  • 0 Attachment
                    melchior prisi wrote:
                    >loro wrote:
                    >> Maybe it depends on OS? I have to write ...\Documents%20and%Settings\My%20Docouments\... Ewww!
                    >
                    >It seems to depend to the browser you use.

                    I meant the urlencoding of spaces.

                    >For Mozilla (1.4.1):
                    >
                    >NO [file:///c:\test\index.html]
                    >NO [file:///c:\test\index.html]
                    >YES [file:///c|/test/index.htm]
                    >YES [file:///C:/test/index.htm]

                    You are right. I just pasted it in the address field and that works. I never tried setting Moz (or Opera) as default browser and actually click the link.

                    >For short:
                    >Drag your file to the browser, then copy the content of
                    >the address field to your otl.
                    >This should always work.

                    Sounds like good advice.

                    Lotta
                  • melchior prisi
                    Hi Lotta, ... Glad I could help :-) Here is a (very basic) clip that produces hyperlinks for a whole directory: H= HTMLDIR ^!set %path%=^?{(t=d)DIRECTORY}
                    Message 9 of 14 , Dec 7, 2003
                    • 0 Attachment
                      Hi Lotta,

                      loro wrote:
                      >>Use ^$filetourl(c:\test\index.htm)$ to convert paths.
                      >
                      > Melchior, I think I love you!!!

                      Glad I could help :-)

                      Here is a (very basic) clip that produces hyperlinks for
                      a whole directory:

                      H="HTMLDIR"
                      ^!set %path%=^?{(t=d)DIRECTORY}
                      ^!sethintinfo works
                      ^!setlistdelimiter <br>^p
                      ^!setarray %files%=^$getfiles("^%path%";"*.htm";name)$; %ct%=0
                      ^!inc %ct%
                      ^!if ^%ct% > ^%files0% skip_2
                      ;LONG LINE FOLLOWS
                      ^!set %files^%ct%%=<a
                      href="^$filetourl(^%files^%ct%%)$">^$getname(^%files^%ct%%)$</a>
                      ;END OF LONG LINE
                      ^!goto skip_-3
                      ^!info [l]^%files%
                      ;END OF CLIP

                      Regards,

                      Melchior

                      --
                      http://orp.alphazwirbel.net/
                    • Jeff
                      H= HTMLDIR ^!set %path%=^?{(t=d)DIRECTORY} ^!sethintinfo works ^!setlistdelimiter ^p ^!setarray %files%=^$getfiles( ^%path% ; *.htm ;name)$; %ct%=0 ^!inc
                      Message 10 of 14 , Dec 7, 2003
                      • 0 Attachment
                        H="HTMLDIR"
                        ^!set %path%=^?{(t=d)DIRECTORY}
                        ^!sethintinfo works
                        ^!setlistdelimiter <br>^p
                        ^!setarray %files%=^$getfiles("^%path%";"*.htm";name)$; %ct%=0
                        ^!inc %ct%
                        ^!if ^%ct% > ^%files0% skip_2
                        ;LONG LINE FOLLOWS
                        ^!set %files^%ct%%=<a
                        href="^$filetourl(^%files^%ct%%)$">^$getname(^%files^%ct%%)$</a>
                        ;END OF LONG LINE
                        ^!goto skip_-3
                        ^!info [l]^%files%
                        ;END OF CLIP

                        Good clip,

                        Is there a way to produce te results as a new document? instead of in a
                        messsage window?

                        would changing the ("^%path%";"*.htm";name) to ("^%path%";"*.*";name)
                        create FULL directory?
                      • melchior prisi
                        Hi Jeff ... The ^!info was just for demonstration. You can do the following: Instead of ^!info ^%files% append this lines to the clip: ^!toolbar new document
                        Message 11 of 14 , Dec 7, 2003
                        • 0 Attachment
                          Hi Jeff

                          ----- Jeff wrote:
                          > Is there a way to produce te results as a new document? instead of in a
                          > messsage window?

                          The ^!info was just for demonstration.
                          You can do the following:
                          Instead of
                          ^!info ^%files%
                          append this lines to the clip:

                          ^!toolbar new document
                          ^!insert ^%files%

                          OR save directly to new file:
                          ^!texttofile "c:\test\new.htm" ^%files%
                          CAUTION: If "new.htm" already exists, it will
                          be overwritten by the "texttofile" command
                          without prompting!

                          > would changing the ("^%path%";"*.htm";name) to ("^%path%";"*.*";name)
                          > create FULL directory?

                          Right.

                          You gan also specify two (or several) file extensions:
                          ^$getfiles("^%path%";"*.jpg;*.gif";name)$

                          And you even could include subdirectories:
                          ^$getfiles("+^%path%";"*.jpg;*.gif";name)$
                          ^ the plus sign lets the function search through
                          subdirectories.


                          To insert images instead of hyperlinks replace this line:
                          ;^!set %files^%ct%%=<a
                          href="^$filetourl(^%files^%ct%%)$">^$getname(^%files^%ct%%)$</a>

                          with this one:
                          ;long line:
                          ^!set %files^%ct%%=<img src="^$filetourl(^%files^%ct%%)$"
                          alt="^$getname(^%files^%ct%%)$" />
                          ;end of line

                          To have a relative path instead of an absolute one
                          you first have to know where your html file will be
                          saved.

                          If the file is in the same directory with the pictures
                          you don't need a path at all.

                          See the help file about ^$GetRelativeName$

                          BTW: Your last message went just to me, not to the list;
                          to get advice from all experts here you should always
                          write to the list, if your subject is not off topic.


                          Regards,
                          Melchior

                          --
                          http://orp.alphazwirbel.net
                        • loro
                          ... Me too! If only you had done so a year ago... :p ... Nice clip. I needed urlencoding for real URLs though, http. Guess that s why I didn t look too close
                          Message 12 of 14 , Dec 7, 2003
                          • 0 Attachment
                            melchior prisi wrote:

                            >Glad I could help :-)

                            Me too! If only you had done so a year ago... :p

                            >Here is a (very basic) clip that produces hyperlinks for
                            >a whole directory:

                            Nice clip. I needed urlencoding for 'real' URLs though, http. Guess that's why I didn't look too close at something concerning itself with disk files. See? Stupid! I've been giggling to myself all evening thinking about how much trouble I had and there it was right under my nose all the time. Thanks again.

                            Lotta
                          • Dave
                            hi R sharp I have tried the ones below these all work the bottom two open for editing ???? [C: NTS readme.txt::6^L] [C: NTS readme.txt::replacement]
                            Message 13 of 14 , Dec 9, 2003
                            • 0 Attachment
                              hi R sharp
                              I have tried the ones below these all work the bottom two open for editing
                              ????
                              [C:\NTS\readme.txt::6^L]
                              [C:\NTS\readme.txt::replacement]
                              [e:\goldwave\readme.txt::Features]
                              [d:\html\conversion.htm]
                              [D:\html\bandpass.html]

                              THANKYOU DAVE
                              ----- Original Message -----
                              From: "R Shapp" <ras45@...>
                              To: <ntb-html@yahoogroups.com>
                              Sent: Sunday, December 07, 2003 10:38 PM
                              Subject: [NH] Hyperlink to local index.html


                              > Hi Group,
                              >
                              > Within an Outline document, I want to provide a hyperlink to an HTML page
                              on
                              > my local C drive at C:\test\index.html. I want index.html to open in my
                              > default browser just as if I had navigated to C:\test\index.html and
                              double
                              > clicked on it.
                              >
                              > I've read Help, and I've tried about nine permutations of naming the
                              > destination with and without enclosing square brackets and/or double
                              quotes,
                              > and some other ideas too. I keep getting one of three undesirable
                              results:
                              > 1. The index.html page opens in NT for editing the HTML source code.
                              > 2. My browser opens displaying whatever the most recent web page was.
                              > 3. An error message tells me that NT was unable to find the target in the
                              > folder where the Outline resides. (Outline document and index.html ARE in
                              > separate folders.)
                              >
                              > There must be a simple way to link from an Outline document to an HTML
                              page
                              > without resorting to the use of a clip. Please tell me what it is.
                              >
                              > Thanks for the help.
                              >
                              > Ray Shapp
                              > NTPro 4.95
                              > WinXP Home
                              > MSOE v8
                              >
                              >
                              >
                              >
                              >
                              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                              >
                              >
                            • R Shapp
                              Hi Dave, Thanks for the added info. It is useful to know I can open a document and jump to a particular line. ...amazin product, ain t it? Ray Shapp
                              Message 14 of 14 , Dec 9, 2003
                              • 0 Attachment
                                Hi Dave,

                                Thanks for the added info. It is useful to know I can open a document and
                                jump to a particular line.

                                ...amazin' product, ain't it?

                                Ray Shapp
                              Your message has been successfully submitted and would be delivered to recipients shortly.