I am currently working on Javascript.
I have a variable withich take value D:\Abc\xyz\mno\rst\uvw.inc
I need to replace all \ with / from above variable.
I am getting the error: SyntaxError: unterminated string literal
Can someone please help me with this issue ?
Code is given below:
<html>
<head>
</head>
<body>
<table>
<tr>
<td>File Name </td>
<td><Input type="text" id="file_name" size="100" onblur="getFilePath(this.value);"> </td>
<td><Input type="text" id="for_file_name" size="100"></td>
</tr>
</table>
<script>
function getFilePath(var_input) {
alert("Input: "+var_input);
var myArray = var_input.split("\");
var myStr = myArray.join('/');
alert(myStr)
}
</script>
</body>
</html>