Hello,
I am trying a java script function that can replace all the double quotes in my code. I have tried it but no success yet. so, if you have any solution for this then please let me know. Thank you for your help.
Hello,
I am trying a java script function that can replace all the double quotes in my code. I have tried it but no success yet. so, if you have any solution for this then please let me know. Thank you for your help.
Hello,
You can try using the escape character in your code, some thing like this
Code:// Split a classnote into array by space var wds=classnote.split(" ") // Replace double quote(") to single quote (') through LOOP for(i=0;i<wds.length;i++) { clntsnotes = clntsnotes + wds[i].replace('"', '\'') + ' '; }
Hello,
You can try the following
Hope this will work, if you have any more queries then you can post back with the error you are getting.Code:<?php $query = 'insert into comment (comment_body) values ('There wasn't any way to accomplish it.'); myquery_query($query); ?>
Hello,
I think this is the code that you are looking for.
HTML Code:<script type="text/javascript"> function fix() { var numelem = document.theForm.elements.length; for (x=0; x<numelem; x++) { // replace all the single, double quotes: var curElement = window.document.theForm.elements[x]; curElement.value = curElement.value.replace(/\'/g, "8"); curElement.value = curElement.value.replace(/\"/g, "&"); } return true; } </script>
Hello,
Have a look at the following code
Code:<Script type="text/javascript"> function func(stirng){return (stirng=stirng.replace(/["']{1}/gi,""));} //test for the function test="'''welcome to '''my site js.gainover.cn"\"\"\"'''"; alert(func(test)); </script>
Hello,
Alternatively you can use the following code
Code:<SCRIPT LANGUAGE="JavaScript"> <!-- var striexam='Hi "how are" you'; striexam=striexam.replace(/\"/g,'\''); alert(striexam); //--> </SCRIPT> Reply 6: Please check this modified code, may help you <script type="text/javascript"> <!--// function cntquts(string){ return string.replace(/"/g,"'"); } // EXAMPLE USAGE: document.write(cntquts('It"s is a test. It"s is a test.')); //--> </script>
Bookmarks