document.getElementById("textbox").innerHTML="<input type='text' value='"+text+"'>";
<a href="#" onclick="view('a \' \" ')">click to view textbox</a>
this is an example of what im trying to do in a site
what this code does is when you click on hyperlink it shows a textbox in the div with text
but single quote is causing problem and not letting it show the textbox even though i have escaped the single quote it will still not work double quote is working fine.
my guess is since i first send it to function and then function prints it so the escape i did is removed and it starts giving error and will not print textbox in the div
can anyone tell what should i add to escape and make it working
i tested it in textarea its working there only it causes problem in textbox