Hi guys
So I have this code, people register on a form, this then goes to a Access file. Then there is a functions that exports the code to an CSV file!
The code works fine, the problem is as follows;
On the form there is a field [Address] and people put things like: [1122 Main Street, apt 402] Which looks fine, but notice that “comma”? What happends is when I export it in to CSV, those commas create separated values (Hence the CSV file), and screws my tables complete up.
So what I need to find out how to do is either; How do I let people type commas without it separating values, not affecting the CSV form. Or how do I forbid people from using commas in a form?
the script is like so:
var queryStreet = "";
if (String(Request.Form("street")) != "undefined" &&
String(Request.Form("street")) != "") {
queryStreet = String(Request.Form("street"));
}
I tried changing it to this:
var queryStreet = "";
if (String(Request.Form("street")) != "undefined" &&
String(Request.Form("street")) != "") {
queryStreet = String(Replace(Request.Form("street"), ",", ""));
But all I got was this:
Microsoft JScript runtime error '800a138f'
Object expected
/registrations/runningstart/reg_add.asp, line 43