tarun Posted May 19, 2007 Share Posted May 19, 2007 Im Not Sure Whats Going Wrong Its Actually Trying To Litererally Replace "string" Rather Than A Specified Input function deltxt(where,string){ var old = document.getElementById(where).innerHTML; var new = old.replace(/string/g, ""); document.getElementById('taskbar').innerHTML = close; } Any Help...? Thnx, Tarun Quote Link to comment Share on other sites More sharing options...
mainewoods Posted May 20, 2007 Share Posted May 20, 2007 try: function deltxt(where,string){ var regexp = '/' + string + '/g'; var old = document.getElementById(where).innerHTML; var new = old.replace(regexp, ""); alert(new); document.getElementById('taskbar').innerHTML = close; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.