sairfan1 Posted August 7, 2010 Share Posted August 7, 2010 hi,following code runs fine in my html file, var t = document.frmPage.fld1.value; document.frmPage.fld1.value = t.replace(/'/gm,"""); alert(t); but when ever i import this file like this <script type="text/javascript" src="/dcomm.js"></script> it stop working, meanz no effect.please help Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2010 Share Posted August 7, 2010 Are there any error messages? Does the element on the page exist when the code runs? Link to comment Share on other sites More sharing options...
thescientist Posted August 8, 2010 Share Posted August 8, 2010 is the referenced file path correct and in the same folder as the HTML document? Link to comment Share on other sites More sharing options...
jeffman Posted August 8, 2010 Share Posted August 8, 2010 t.replace(/'/gm,""") That code isn't going to work anywhere. One of these will do better: t.replace(/'/gm,"\"") t.replace(/'/gm,'"') Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.