Need help with document.write

wxdqz

New Member
I write a cookie with a user's first and last name as entered in my member database. When someone returns to the home page I read the cookie to write their first and last name on the page.

function who(info){
var fname = GetCookie('fname')
var lname = GetCookie('lname')
return fname + " " + lname;
}


document.write(Who());


Problem is some people enter a middle initial or suffix with their name in the database like John S. Doe, and it prints on the page like this: John S.+Doe

How can I get rid of the + sign?
 
Back
Top