Linking to Network Folder path with javascript

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Linking to Network Folder path with javascript

    Hi,

    I need some help please and hopefully you have the answer.

    I have a javascript code that involves two drop down menus, when one is chosen
    the second menu populates depending on the chosen option in the first.

    This works fine, except for the second menus links. It is set to automatically
    go to the network drive folder when chosen.

    If its a web page it works fine, but if it is a folder on the drive it cannot
    display the page:

    The javascript example for each link I have is:

    options[1]=new Option("Power &
    Technologies","file:///\\net-drive\Users\support\Training Presentations\Ongoing
    Training\Power");


    When the page loads, the address bar displays:

    \\net-driveUserssupportTraining PresentationsOngoing TrainingPower


    As you can see it is not loading the "\" Backslashes to seperate the path
    links.

    Can this be rectified in anyway please?

    Cheers


    Macnimation Guest

  2. Similar Questions and Discussions

    1. cfdirectory - linking directory folder to contents ofdirectory.
      cfdirectory listing... Here is my problem... I am listing directorys and when each directory is listed I want to list the contents of that...
    2. help linking from a projector to *.dir within another folder
      Hi, I´m triying to link a dir document in a folder (b) from a projector in a folder (a), the folder (b) is in the folder (a), I have tried with: ...
    3. script for linking to a folder on cd-rom
      Hi there I've just joined the forum and a beginner user of director. This is probably a very basic question but can someone please tell me how I...
    4. Network linking 2 machines
      WIN XP Prof Hi there. I'm totally new to what I am asking now, so please help me out. I have a PC (XP Prof) and a Laptop (XP Prof) I have...
    5. linking with home directory path
      I have a script that contains style sheets and I can't seem to link it on my Windows 2000 IIS server. It works perfectly fine on my Windows XP IIS...
  3. #2

    Default Re: Linking to Network Folder path with javascript

    Since the backslash character in Javascript is used to escape special
    characters within strings, I would try preceding the backslashes between folder
    names with another backslash, i.e. net-drive\\Users...

    delaneypub Guest

  4. #3

    Default Linking to Network Folder path with javascript

    use \\ to use a backslash, it's a reserved character.. \\servername\\folder1\\folder2\\folder3
    Quote Originally Posted by Macnimation View Post
    Hi,

    I need some help please and hopefully you have the answer.

    I have a javascript code that involves two drop down menus, when one is chosen
    the second menu populates depending on the chosen option in the first.

    This works fine, except for the second menus links. It is set to automatically
    go to the network drive folder when chosen.

    If its a web page it works fine, but if it is a folder on the drive it cannot
    display the page:

    The javascript example for each link I have is:

    options[1]=new Option("Power &
    Technologies","file:///\\net-drive\Users\support\Training Presentations\Ongoing
    Training\Power");


    When the page loads, the address bar displays:

    \\net-driveUserssupportTraining PresentationsOngoing TrainingPower


    As you can see it is not loading the "\" Backslashes to seperate the path
    links.

    Can this be rectified in anyway please?

    Cheers
    Luke Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139