On 7/3/07, Ian <[EMAIL PROTECTED]> wrote:
>
> Your function works. How/when are you firing it?
>
> the following responds as expected.
>
> <script type="text/javascript">
> function cleanQuestion(str) {
>  var myReturn = str.replace(/^\?/, '&#63;');
>  return myReturn;
>  }
>
>  alert('?');
>  alert(cleanQuestion('?'));
> </script>
>
> but why not use encodeURI?
> http://www.w3schools.com/jsref/jsref_encodeURI.asp

The function works, but when placed back in the original function, it
just places the question mark back in context, so I have not achieved
anything.  I was told about encodeURIComponent and she works great.

Cheers
-- 
BeeRich, Toronto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to