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

Base directory for script in an external file.

Expand Messages
  • paulroubekas
    I have some script in an external file. I need to find some files in the directory hierarchy while running the script in the external file. My question is
    Message 1 of 4 , Jan 2, 2004
    • 0 Attachment
      I have some script in an external file. I need to find some files in
      the directory hierarchy while running the script in the external
      file. My question is this, what is considered the current
      directory? The location of the .svg file from which the external
      script is referenced, or the directory location of the external
      script file? Since each of the files is not at the same level in my
      directory hierarchy it seems to be making a difference.
    • Jim Ley
      paulroubekas wrote in message news:bt4c15+omc5@eGroups.com... ... Define find some files . If you re entering things into the DOM, then
      Message 2 of 4 , Jan 2, 2004
      • 0 Attachment
        "paulroubekas" <paul@...> wrote in message
        news:bt4c15+omc5@......
        > I have some script in an external file. I need to find some files in
        > the directory hierarchy while running the script in the external
        > file. My question is this, what is considered the current
        > directory?

        Define "find some files".

        If you're entering things into the DOM, then it'll be relative to the url of
        the document.

        Jim.
      • paulroubekas
        I find some files using getURL(). ... files in ... the url of
        Message 3 of 4 , Jan 2, 2004
        • 0 Attachment
          I 'find some files' using getURL().

          --- In svg-developers@yahoogroups.com, "Jim Ley" <jim@j...> wrote:
          >
          > "paulroubekas" <paul@r...> wrote in message
          > news:bt4c15+omc5@e...
          > > I have some script in an external file. I need to find some
          files in
          > > the directory hierarchy while running the script in the external
          > > file. My question is this, what is considered the current
          > > directory?
          >
          > Define "find some files".
          >
          > If you're entering things into the DOM, then it'll be relative to
          the url of
          > the document.
          >
          > Jim.
        • Jim Ley
          paulroubekas wrote in message news:bt4e3d+gmh3@eGroups.com... ... Test and find out, it would be my expectation that it would be relative
          Message 4 of 4 , Jan 3, 2004
          • 0 Attachment
            "paulroubekas" <paul@...> wrote in message
            news:bt4e3d+gmh3@......

            > I 'find some files' using getURL().

            Test and find out, it would be my expectation that it would be relative to
            the base URL of the document, as if it's not then there's a potential
            security problem. (include a script from a 3rd party site that does getURL
            and rewrite the javascript to get any url from that site which can then be
            passed back to the other script.)

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