Replacing ' and %

Results 1 to 2 of 2

Thread: Replacing ' and %

  1. #1
    Join Date
    Dec 1969

    Default Replacing ' and %

    Hi in a signup form i dont want people to be able to use % and i want to filter the &#039; so that i dont get an error.. now i have read the FAQ&#039;s etc.. and i really am a newB i need help with this as i dont understand it<BR><BR>I have tried this but i get the following error<BR><BR>Replace(Request.Form("username"),"%", "","&#039;","&#039;&#039;")<BR><BR><BR>Error:<BR>< BR>Microsoft VBScript runtime error &#039;800a000d&#039; <BR><BR>Type mismatch: &#039;[string: "&#039;&#039;"]&#039; <BR><BR>signup_done.asp, line 11 <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Replacing ' and %

    Replace() can ony take 3 arguments. yes, three.<BR><BR>Replace(string, remove, substitute)<BR><BR>so you should be calling it twice, once for each replacement<BR><BR>you may find it useful to grab a copy of the windows scripting documentation from - just download the documentation package - it&#039;s incredibly useful<BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts