Need help with Javascript Replace Bookmarklet
<p>I've searched the other questions and tried the suggestions but i still couldn't implement my bookmarklet successfully. Any suggestions on my code below will be appreciated. My goal is to get the script capture the current text selection via <code>document.getSelection()</code> and then replace all the dots with plus sign (it's for a task that has a few dots for each row of data).</p>

<pre><code>javascript:(function(){ 

  var stringselect = null;

  function replaceString (text) {
    text = text.replace('.','+');
    return text; 
  } 

  var stringselect = document.getSelection();
  var result = replaceString(stringselect);

  alert(result); //for testing purposes, i wanted to see the replaced text in the alert box but it didn't pop up.
})();
</code></pre>
