Skip to content Skip to sidebar Skip to footer

Path With Backslashes To Path With Forward Slashes Javascript

I'm trying to make a local xml file parsing 'application' for some colleagues and i'm using the current function to retrieve the files: function ShowFolderFileList(folderspec) {

Solution 1:

The replace method does not alter the current instance of the string, but returns a new one. See if this works:

pathString = pathString.replace(/\\/g,"/");

See this example on jsfiddle.

Post a Comment for "Path With Backslashes To Path With Forward Slashes Javascript"