0

I have something like this :

$(gridId).jqGrid('resetSelection');

in gridId when someone enter value like "Flowsheet 1) test" got syntax error because of ")" characters.

Is there any method on JQuery to handle it?

Thanxs.

Lfa
  • 1,069
  • 2
  • 10
  • 23

1 Answers1

0

Use this :

function TestSpecialCharacter(string) {
    if (/^[a-zA-Z0-9 ]*$/.test(string) == false) {
        return true;
    } else {
        return false;
    }

}

Hope this may useful

Suganth G
  • 5,136
  • 3
  • 25
  • 44