i am facing an error in Jquery Load function. I am using jquery to find a string in MySQL database table.
here is a sample of my code.
nUrl='count.php?coun='+(code);
$('#memory2').load(nUrl);
here, i am using “code” as input. when i use “(” in code like:
code = "DQ118 (dq10)";
browser gives me an error like:
Uncaught Syntax error, unrecognized expression: (
It works pretty fine, look here. Just maybe try to encode your URI, by using
encodeURIComponentand use
varbefore you declare your variable. For exampleso you avoid declaring your variable globally