I'm having a problem taking input from a textbox and adding it to a sting, it involves the '\' char. Since a normal string will see this as an escape it will screw up a string that I then pass to another function. I'm new to javascript and yui so I'm just wondering if there is a built in way to escape a string value I get from the textbox, so it will take a '\' and make it a "\" and so on.
My code looks a little like this
var requestStr = "\" Request\"";
requestStr = requestStr + "\"" + document.getElementById("textbox").value + "\",";
Edit: Fixed code to properly show my example