What I'm trying to do is validate an entry that a user types in. I'm trying to use wildcards but I'm not sure how. I want to make sure that no commas, double quotes, and single quotes are in the text entered by the user. My database statement can't handle those entries so I need to keep them out. How do I do it in Javascript in a ASP document? Also how do I check for double quotes? What do I wrap around them to have them be seen as double quotes?
function validate()
{
bugtitle=document.f_bugedit.Title
bugdesc=document.f_bugedit.Description
bugbf=document.f_bugedit.BuildFixed
bugbr=document.f_bugedit.BuildReported
If ((bugtitle="*,*"
|| (bugtitle="*'*"
|| (bugdesc="*,*"
|| (bugdesc="*'*"
|| (bugbf="*,*"
|| (bugbf="*'*"
|| (bugbr="*,*"
|| (bugbr="*'*"
)
{
alert("Please do not use any single quotes, double quotes or comma characters in your bug report. Thanks!"
}
}
function validate()
{
bugtitle=document.f_bugedit.Title
bugdesc=document.f_bugedit.Description
bugbf=document.f_bugedit.BuildFixed
bugbr=document.f_bugedit.BuildReported
If ((bugtitle="*,*"
{
alert("Please do not use any single quotes, double quotes or comma characters in your bug report. Thanks!"
}
}