I have added an option on my clients website to allow visitors to enquire about their stock, its just a simple click and then they get a pop up form, they love it as they are getting more business, but its creating 1 validation error which is stopping me getting the green light, and its very annoying.

Here is the link to the validator and the error -


When the user clicks the link on the site its grabbing the name of the clock and the ref number and passing it to the pop up via the url, and basically the spaces between the names is whats causing the errors.

you can see it for yourself by going here -


and click 'here' in the click here to make an enquiry above the clock.

By the way i didnt build this site, its quite old and I'm helping out with SEO, and the code below is where I need some help.

sSQL = "SELECT * FROM products WHERE PID = " & pid & " AND (Status = 'SHOW' OR Status = 'SOLD')"
If Not rs.BOF And Not rs.EOF Then
arr = rs.GetRows
For i = 0 To UBound(arr,2)
set fs=Server.CreateObject("Scripting.FileSystemObject")
wr "<div class='Clock' style='position:relative; width:100%; height:22px; line-height:25px; text-align:center;'>I am interested in this item - click <a href='../stock_Enquiry.asp?ID=" & pid & "&amp;Name=" & arr(1,i) & "' style='font-size:12px; text-decoration:underline;' onClick='showPopup(this.href); return(false);'>here</a> to make an enquiry" & vbcrlf
wr "</div>" & vbcrlf
And this bit in particular.

Name=" & arr(1,i) & "
As it drawing the info from the array, what I need to try and do is take value within that region of the array, change the spaces for somehting like %20 and then put it back together, which will solve the spaces between the value problem, and hopefully allow the validator to give me the green light.