View Single Post
  #1 (permalink)  
Old August 20th, 2004, 06:46 AM
JohnD JohnD is offline
Registered User
 
Join Date: Aug 2004
Location: Dublin, , Ireland.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default String.replace() method

Hello,

Can anybody explain this for me?

var strName = "John Archer";
    strName = strName.replace(" ","_");

I should get

strName = "John_Archer";

This is great in client side Javascript. However, the same trick doesn't work when you are using javascript in an ASP application. It seems to falter with both "'" and " ".

Reply With Quote