Click to See Complete Forum and Search --> : Problem with \\ and \


vayumahesh
04-12-2007, 02:25 PM
Hi,

I have the following code (into a variable say, responseText)

document.updateAccessGroup.dataLocUpd.value='\\crwd0004\grpdata'

When I execute the above code using
evaluate(responseText)

I get the output as \crwd0004grpdata (stripped away one slash in the beginning and the remaining slashes)

Also, If I have \\crwd0004\grpdata\ (notice the extra slash at the end), I get Unterminated String Constant error.

Please help.

Thanks
vmrao

TheBearMay
04-12-2007, 02:29 PM
document.updateAccessGroup.dataLocUpd.value='\\\\crwd0004\\grpdata';


If you need a slash at the end:

document.updateAccessGroup.dataLocUpd.value='\\\\crwd0004\\grpdata\\';