Hello,
I am brand new to .ASP and am being asked to debug a problem with handling apostrophes. I'm aware of the Replace function, but I'm not sure where in the code I should insert it.
I've attached a zip file with the 2 relevant .asp pages in it, and to replicate the problem, take the following steps:
Go to http://www.larter.com/v2/collections.asp ?c=sig&i=1&s=34 100219BW--00
Click on "Inquire"
You will be brought to the /locator.asp page and asked to fill in information. Only the Zip, Distance, and Email are required.
Use the Zip Code 08530 and select 15 miles for the distance.
The first entry should be Saunder's in Flemington, NJ.
The locator.asp page populates store information into the sidebar next to the map, and the Send Inquiry button calls the sendinquiryemai l.asp page. The problem is that a store name with an apostrophe will give the following error when you click the button:
CDO.Message.1 error '8004020d'
At least one of the From or Sender fields is required, and neither was found.
/v2/sendinquiryemai l.asp, line 121
When I use the Inspect Element function in Chrome, it shows the button's code with the data already populated, and the S after the apostrophe is broken off from the name. I am aware of the Replace("Field" , "'", "''") code, but as I am very new to .asp I can't tell exactly where the store name is called from the database and where I should insert this code. Can anyone help me with this? Thanks in advance for any advice!
Doug Coyne
I am brand new to .ASP and am being asked to debug a problem with handling apostrophes. I'm aware of the Replace function, but I'm not sure where in the code I should insert it.
I've attached a zip file with the 2 relevant .asp pages in it, and to replicate the problem, take the following steps:
Go to http://www.larter.com/v2/collections.asp ?c=sig&i=1&s=34 100219BW--00
Click on "Inquire"
You will be brought to the /locator.asp page and asked to fill in information. Only the Zip, Distance, and Email are required.
Use the Zip Code 08530 and select 15 miles for the distance.
The first entry should be Saunder's in Flemington, NJ.
The locator.asp page populates store information into the sidebar next to the map, and the Send Inquiry button calls the sendinquiryemai l.asp page. The problem is that a store name with an apostrophe will give the following error when you click the button:
CDO.Message.1 error '8004020d'
At least one of the From or Sender fields is required, and neither was found.
/v2/sendinquiryemai l.asp, line 121
When I use the Inspect Element function in Chrome, it shows the button's code with the data already populated, and the S after the apostrophe is broken off from the name. I am aware of the Replace("Field" , "'", "''") code, but as I am very new to .asp I can't tell exactly where the store name is called from the database and where I should insert this code. Can anyone help me with this? Thanks in advance for any advice!
Doug Coyne
Comment